Data processing system and method for efficient coherency communication utilizing coherency domain indicators

ABSTRACT

In a cache coherent data processing system including at least first and second coherency domains, a memory block is stored in a system memory in association with a domain indicator indicating whether or not the memory block is cached, if at all, only within the first coherency domain. A master in the first coherency domain determines whether or not a scope of broadcast transmission of an operation should extend beyond the first coherency domain by reference to the domain indicator stored in the cache and then performs a broadcast of the operation within the cache coherent data processing system in accordance with the determination.

CROSS-REFERENCE TO RELATED APPLICATIONS

The present application is related to the following copendingapplications, which are assigned to the assignee of the presentinvention and incorporated herein by reference in their entireties:

(1) U.S. patent application Ser. No. 10/______ (Docket No.AUS920040803US1);

(2) U.S. patent application Ser. No. 10/______ (Docket No.AUS920040804US1);

(3) U.S. patent application Ser. No. 10/______ (Docket No.AUS920040940US1);

(4) U.S. patent application Ser. No. 10/______ (Docket No.AUS920040942US1);

(5) U.S. patent application Ser. No. 10/______ (Docket No.AUS920040966US1); and

(6) U.S. patent application Ser. No. 10/______ (Docket No.AUS920050093US1).

BACKGROUND OF THE INVENTION

1. Technical Field

The present invention relates in general to data processing and, inparticular, to data processing in a cache coherent data processingsystem.

2. Description of the Related Art

A conventional symmetric multiprocessor (SMP) computer system, such as aserver computer system, includes multiple processing units all coupledto a system interconnect, which typically comprises one or more address,data and control buses. Coupled to the system interconnect is a systemmemory, which represents the lowest level of volatile memory in themultiprocessor computer system and which generally is accessible forread and write access by all processing units. In order to reduce accesslatency to instructions and data residing in the system memory, eachprocessing unit is typically further supported by a respectivemulti-level cache hierarchy, the lower level(s) of which may be sharedby one or more processor cores.

Because multiple processor cores may request write access to a samecache line of data and because modified cache lines are not immediatelysynchronized with system memory, the cache hierarchies of multiprocessorcomputer systems typically implement a cache coherency protocol toensure at least a minimum level of coherence among the various processorcore's “views” of the contents of system memory. In particular, cachecoherency requires, at a minimum, that after a processing unit accessesa copy of a memory block and subsequently accesses an updated copy ofthe memory block, the processing unit cannot again access the old copyof the memory block.

A cache coherency protocol typically defines a set of cache statesstored in association with the cache lines of each cache hierarchy, aswell as a set of coherency messages utilized to communicate the cachestate information between cache hierarchies. In a typicalimplementation, the cache state information takes the form of thewell-known MESI (Modified, Exclusive, Shared, Invalid) protocol or avariant thereof, and the coherency messages indicate a protocol-definedcoherency state transition in the cache hierarchy of the requestorand/or the recipients of a memory access request.

Heretofore, cache coherency protocols have generally assumed that tomaintain cache coherency a global broadcast of coherency messages had tobe employed. That is, that all coherency messages must be received byall cache hierarchies in an SMP computer system. The present inventionrecognizes, however, that the requirement of global broadcast ofcoherency messages creates a significant impediment to the scalabilityof SMP computer systems and, in particular, consumes an increasingamount of the bandwidth of the system interconnect as systems scale.

SUMMARY OF THE INVENTION

In view of the foregoing and other shortcomings in the art, the presentinvention provides an improved cache coherent data processing system andmethod of data processing in a cache coherent data processing system.

In one embodiment, a cache coherent data processing system includes atleast first and second coherency domains. A master performs a firstbroadcast of an operation within the cache coherent data processingsystem that is limited in scope of transmission to the first coherencydomain. The master receives a response of the first coherency domain tothe first broadcast of the operation. If the response indicates theoperation cannot be serviced in the first coherency domain alone, themaster increases the scope of transmission by performing a secondbroadcast of the operation in both the first and second coherencydomains. If the response indicates the operation can be serviced in thefirst coherency domain, the master refrains from performing the secondbroadcast, so that communication bandwidth utilized to service theoperation is reduced.

In another embodiment, a cache coherent data processing system includesat least first and second coherency domains, and a memory block isstored in a system memory in association with a domain indicatorindicating whether or not the memory block is cached, if at all, onlywithin the first coherency domain. A master in the first coherencydomain determines whether or not a scope of broadcast transmission of anoperation should extend beyond the first coherency domain by referenceto the domain indicator stored in the cache and then performs abroadcast of the operation within the cache coherent data processingsystem in accordance with the determination.

In another embodiment, a cache coherent data processing system includesa plurality of processing units each having at least an associatedcache, a system memory, and a memory controller that is coupled to andcontrols access to the system memory. The system memory includes aplurality of storage locations for storing a memory block of data, whereeach of the plurality of storage locations is sized to store a sub-blockof data. The system memory further includes metadata storage for storingmetadata, such as a domain indicator, describing the memory block. Inresponse to a failure of a storage location for a particular sub-blockamong the plurality of sub-blocks, the memory controller overwrites atleast a portion of the metadata in the metadata storage with theparticular sub-block of data.

In another embodiment, a cache coherent data processing system includesat least first and second coherency domains each including at least oneprocessing unit and a cache memory. The cache memory includes a cachecontroller, a data array including a data storage location for caching amemory block, and a cache directory. The cache directory includes a tagfield for storing an address tag in association with the memory blockand a coherency state field associated with the tag field and the datastorage location. The coherency state field has a plurality of possiblestates including a state that indicates that the address tag is valid,that the storage location does not contain valid data, and that thememory block is possibly cached outside of the first coherency domain.

In yet another embodiment, a cache coherent data processing systemincludes a memory controller of a system memory that receives first andsecond castout operations both specifying a same address. In response toreceiving said first and second castout operations, the memorycontroller performs a single update to the system memory.

In still another embodiment, a cache coherent data processing systemincludes at least first and second coherency domains each including atleast one processing unit. The first coherency domain includes a firstcache memory and a second cache memory, and the second coherency domainincludes a remote coherent cache memory. The first cache memory includesa cache controller, a data array including a data storage location forcaching a memory block, and a cache directory. The cache directoryincludes a tag field for storing an address tag in association with thememory block and a coherency state field associated with the tag fieldand the data storage location. The coherency state field has a pluralityof possible states including a state that indicates that the memoryblock is possibly shared with the second cache memory in the firstcoherency domain and cached only within the first coherency domain.

All objects, features, and advantages of the present invention willbecome apparent in the following detailed written description.

BRIEF DESCRIPTION OF THE DRAWINGS

The novel features believed characteristic of the invention are setforth in the appended claims. However, the invention, as well as apreferred mode of use, will best be understood by reference to thefollowing detailed description of an illustrative embodiment when readin conjunction with the accompanying drawings, wherein:

FIG. 1 is a high level block diagram of an exemplary data processingsystem in accordance with the present invention;

FIG. 2 is a more detailed block diagram of a processing unit inaccordance with the present invention;

FIG. 3 is a more detailed block diagram of the L2 cache array anddirectory depicted in FIG. 2;

FIG. 4 is a time-space diagram of an exemplary transaction on the systeminterconnect of the data processing system of FIG. 1;

FIG. 5 is a high level logical flowchart of an exemplary method ofservicing a read request by a processor core;

FIG. 6 is a high level logical flowchart of an exemplary method ofservicing an update request by a processor core;

FIG. 7 is a high level logical flowchart of an exemplary method ofservicing a write request by a processor core;

FIG. 8 is a high level logical flowchart of an exemplary method ofperforming an I/O read operation;

FIG. 9A is a high level logical flowchart of an exemplary method ofperforming an I/O write operation;

FIG. 9B is a high level logical flowchart of an exemplary method ofperforming an I/O partial write operation;

FIG. 10 is a high level logical flowchart of an exemplary method ofperforming a cache castout operation;

FIG. 11A is a high level logical flowchart of an exemplary method ofperforming a bus read operation;

FIG. 11B is a high level logical flowchart of an exemplary method ofperforming a bus read operation in a data processing system having datadelivery domains in accordance with the present invention;

FIG. 12A is a high level logical flowchart of an exemplary method ofperforming a bus RWITM operation;

FIG. 12B is a high level logical flowchart of an exemplary method ofperforming a bus RWITM operation in a data processing system having datadelivery domains in accordance with the present invention;

FIG. 13 is a high level logical flowchart of an exemplary method ofperforming a bus DClaim operation in accordance with the presentinvention;

FIG. 14 is a high level logical flowchart of an exemplary method ofperforming a bus kill operation in accordance with the presentinvention;

FIG. 15 is a high level logical flowchart of an exemplary method ofperforming a bus DCBZ operation in accordance with the presentinvention;

FIG. 16 is a high level logical flowchart of an exemplary method ofperforming a bus castout operation in accordance with the presentinvention;

FIG. 17A is a high level logical flowchart of an exemplary method ofperforming a bus write operation in accordance with the presentinvention;

FIG. 17B is a high level logical flowchart of an exemplary method ofperforming a bus partial write operation in accordance with the presentinvention;

FIG. 18 is a high level logical flowchart of an exemplary method ofservicing a read request by a processor core in a data processing systemimplementing coherency domains in accordance with the present invention;

FIG. 19 is a high level logical flowchart of an exemplary method ofservicing a processor update operation in a data processing systemimplementing coherency domains in accordance with the present invention;

FIG. 20 is a high level logical flowchart of an exemplary method ofservicing a processor write operation in a data processing systemimplementing coherency domains in accordance with the present invention;

FIG. 21 is a high level logical flowchart of an exemplary method ofperforming an I/O read operation in a data processing systemimplementing coherency domains in accordance with the present invention;

FIG. 22 is a high level logical flowchart of an exemplary method ofperforming an I/O write operation in a data processing systemimplementing coherency domains in accordance with the present invention;

FIG. 23 is a high level logical flowchart of an exemplary method ofperforming a cache castout operation in a data processing systemimplementing coherency domains in accordance with the present invention;

FIG. 24 is a high level logical flowchart of an exemplary method ofperforming a local bus read operation in a data processing systemimplementing coherency domains in accordance with the present invention;

FIG. 25 is a high level logical flowchart of an exemplary method ofperforming a local bus RWITM operation in a data processing systemimplementing coherency domains in accordance with the present invention;

FIG. 26 is a high level logical flowchart of an exemplary method ofperforming a local bus DClaim operation in a data processing systemimplementing coherency domains in accordance with the present invention;

FIG. 27 is a high level logical flowchart of an exemplary method ofperforming a local bus DCBZ operation in a data processing systemimplementing coherency domains in accordance with the present invention;

FIG. 28 is a high level logical flowchart of an exemplary method ofperforming a local bus castout operation in a data processing systemimplementing coherency domains in accordance with the present invention;

FIG. 29 is a high level logical flowchart of an exemplary method ofperforming a local bus write operation in a data processing systemimplementing coherency domains in accordance with the present invention;

FIG. 30 illustrates a domain indicator in accordance with a preferredembodiment of the present invention;

FIG. 31 is a high level logical flowchart of an exemplary method ofperforming a local bus read operation in a data processing systemimplementing coherency domains and domain indicators in accordance withthe present invention;

FIG. 32 is a high level logical flowchart of an exemplary method ofperforming a global bus read operation in a data processing systemimplementing coherency domains and domain indicators in accordance withthe present invention;

FIG. 33 is a high level logical flowchart of an exemplary method ofperforming a local bus RWITM operation in a data processing systemimplementing coherency domains and domain indicators in accordance withthe present invention;

FIG. 34 is a high level logical flowchart of an exemplary method ofperforming a global bus read operation in a data processing systemimplementing coherency domains and domain indicators in accordance withthe present invention;

FIG. 35 is a high level logical flowchart of an exemplary method ofperforming a global bus DClaim operation in a data processing systemimplementing coherency domains and domain indicators in accordance withthe present invention;

FIG. 36 is a high level logical flowchart of an exemplary method ofperforming a global bus DCBZ operation in a data processing systemimplementing coherency domains and domain indicators in accordance withthe present invention;

FIG. 37 is a high level logical flowchart of an exemplary method ofperforming a global bus write operation in a data processing systemimplementing coherency domains and domain indicators in accordance withthe present invention;

FIG. 38 is a high level logical flowchart of an exemplary method ofperforming a local bus write operation in a data processing systemimplementing coherency domains and domain indicators in accordance withthe present invention;

FIG. 39 is a high level logical flowchart of an exemplary method ofperforming a local bus castout operation in a data processing systemimplementing coherency domains and domain indicators in accordance withthe present invention;

FIG. 40 is a high level logical flowchart of an exemplary method ofperforming a global bus castout operation in a data processing systemimplementing coherency domains and domain indicators in accordance withthe present invention;

FIG. 41 is a high level logical flowchart of an exemplary method ofperforming a global bus partial write operation in a data processingsystem implementing coherency domains and domain indicators inaccordance with the present invention;

FIGS. 42-43 depict an exemplary system memory configuration thatenhances storage of domain indicators in accordance with the presentinvention;

FIG. 44 is a high level logical flowchart of an exemplary cache castoutoperation for a data processing system implementing coherency domains,domain indicators and the Ig cache state in accordance with the presentinvention;

FIG. 45 is a high level logical flowchart of an exemplary method ofperforming a local bus read operation in a data processing systemimplementing coherency domains, domain indicators and the Ig state inaccordance with the present invention;

FIG. 46 is a high level logical flowchart of an exemplary method ofperforming a local bus RWITM operation in a data processing systemimplementing coherency domains, domain indicators and the Ig state inaccordance with the present invention;

FIG. 47 is a high level logical flowchart of an exemplary method ofperforming a global bus RWITM operation in a data processing systemimplementing coherency domains, domain indicators and the Ig state inaccordance with the present invention;

FIG. 48 is a high level logical flowchart of an exemplary method ofperforming a global bus DClaim operation in a data processing systemimplementing coherency domains, domain indicators and the Ig state inaccordance with the present invention;

FIG. 49 is a high level logical flowchart of an exemplary method ofperforming a global bus kill operation in a data processing systemimplementing coherency domains, domain indicators and the Ig state inaccordance with the present invention;

FIGS. 50 and 51 are high level logical flowcharts of exemplary methodsof performing local and global bus castout operations, respectively, ina data processing system implementing coherency domains, domainindicators and the Ig state in accordance with the present invention;

FIG. 52 is a block diagram of an exemplary implementation of a memorycontroller in accordance with at least one embodiment of the presentinvention;

FIG. 53 is a high level logical flowchart of an exemplary method bywhich a memory controller of a system memory may handle castoutcollisions in accordance with at least one embodiment of the presentinvention;

FIG. 54 is a high level logical flowchart of an exemplary method ofservicing a read operation by a processor core in a data processingsystem implementing Tn and Ten coherency states in accordance with thepresent invention;

FIGS. 55A-55B together form a high level logical flowchart of anexemplary method of servicing a processor update operation in a dataprocessing system implementing Tn and Ten coherency states in accordancewith the present invention;

FIG. 56A-56B together form a high level logical flowchart of anexemplary method of servicing a processor write operation in a dataprocessing system implementing Tn and Ten coherency states in accordancewith the present invention;

FIG. 57 is a high level logical flowchart of an exemplary method ofperforming an I/O write operation in a data processing systemimplementing Tn and Ten coherency states in accordance with the presentinvention;

FIG. 58 is a high level logical flowchart of an exemplary method ofperforming a local bus read operation in a data processing systemimplementing Tn and Ten coherency states in accordance with the presentinvention;

FIGS. 59A-59B together form a high level logical flowchart of anexemplary method of performing a global bus read operation in a dataprocessing system implementing Tn and Ten coherency states in accordancewith the present invention;

FIG. 60 is a high level logical flowchart of an exemplary method ofperforming a local bus RWITM operation in a data processing systemimplementing Tn and Ten coherency states in accordance with the presentinvention;

FIGS. 61A-61B together form a high level logical flowchart of anexemplary method of performing a global bus RWITM operation in a dataprocessing system implementing Tn and Ten coherency states in accordancewith the present invention;

FIG. 62 is a high level logical flowchart of an exemplary method ofperforming a local bus DClaim operation in a data processing systemimplementing Tn and Ten coherency states in accordance with the presentinvention;

FIG. 63 is a high level logical flowchart of an exemplary method ofperforming a global bus DClaim operation in a data processing systemimplementing Tn and Ten coherency states in accordance with the presentinvention;

FIG. 64 is a high level logical flowchart of an exemplary method ofperforming a local bus kill operation in a data processing systemimplementing Tn and Ten coherency states in accordance with the presentinvention;

FIG. 65 is a high level logical flowchart of an exemplary method ofperforming a global bus kill operation in a data processing systemimplementing Tn and Ten coherency states in accordance with the presentinvention;

FIG. 66 is a high level logical flowchart of an exemplary method ofperforming a local bus DCBZ operation in a data processing systemimplementing Tn and Ten coherency states in accordance with the presentinvention;

FIG. 67 is a high level logical flowchart of an exemplary method ofperforming a global bus DCBZ operation in a data processing systemimplementing Tn and Ten coherency states in accordance with the presentinvention;

FIG. 68 is a high level logical flowchart of an exemplary method ofperforming a local bus castout operation in a data processing systemimplementing Tn and Ten coherency states in accordance with the presentinvention;

FIG. 69 is a high level logical flowchart of an exemplary method ofperforming a global bus castout operation in a data processing systemimplementing Tn and Ten coherency states in accordance with the presentinvention;

FIG. 70 is a high level logical flowchart of an exemplary method ofperforming a local bus write operation in a data processing systemimplementing Tn and Ten coherency states in accordance with the presentinvention;

FIG. 71 is a high level logical flowchart of an exemplary method ofperforming a global bus write operation in a data processing systemimplementing Tn and Ten coherency states in accordance with the presentinvention; and

FIG. 72 is a high level logical flowchart of an exemplary method ofperforming a global bus partial write operation in a data processingsystem implementing Tn and Ten coherency states in accordance with thepresent invention.

DETAILED DESCRIPTION OF ILLUSTRATIVE EMBODIMENT

I. Exemplary Data Processing System

With reference now to the figures and, in particular, with reference toFIG. 1, there is illustrated a high level block diagram of an exemplaryembodiment of a cache coherent symmetric multiprocessor (SMP) dataprocessing system in accordance with the present invention. As shown,data processing system 100 includes multiple processing nodes 102 a, 102b for processing data and instructions. Processing nodes 102 are coupledto a system interconnect 110 for conveying address, data and controlinformation. System interconnect 110 may be implemented, for example, asa bused interconnect, a switched interconnect or a hybrid interconnect.On exemplary embodiment of system interconnect 110 may be found inabove-referenced U.S. patent application Ser. No. 10/______ (Docket No.AUS920050093US1).

In the depicted embodiment, each processing node 102 is realized as amulti-chip module (MCM) containing four processing units 104 a-104 d,each preferably realized as a respective integrated circuit. Theprocessing units 104 within each processing node 102 are coupled forcommunication to each other and system interconnect 110 by a localinterconnect 114, which, like system interconnect 110, may beimplemented, for example, with one or more buses and/or switches.

The devices attached to each local interconnect 114 include not onlyprocessing units 104, but also one or more memory controllers 106, eachproviding an interface to a respective system memory 108. Data andinstructions residing in system memories 108 can generally be accessedand modified by a processor core in any processing unit 104 in anyprocessing node 102 of data processing system 100. In alternativeembodiments of the invention, one or more memory controllers 106 (andsystem memories 108) can be coupled to system interconnect 110 ratherthan a local interconnect 114, or alternatively, integrated withinanother device such as a processing unit 104.

Those skilled in the art will appreciate that SMP data processing system100 can include many additional unillustrated components, such asinterconnect bridges, non-volatile storage, ports for connection tonetworks or attached devices, etc. Because such additional componentsare not necessary for an understanding of the present invention, theyare not illustrated in FIG. 1 or discussed further herein. It shouldalso be understood, however, that the enhancements provided by thepresent invention are applicable to cache coherent data processingsystems of diverse architectures and are in no way limited to thegeneralized data processing system architecture illustrated in FIG. 1.

Referring now to FIG. 2, there is depicted a more detailed block diagramof an exemplary processing unit 104 in accordance with the presentinvention. In the depicted embodiment, each processing unit 104 includestwo processor cores 200 a, 200 b for independently processinginstructions and data. Each processor core 200 includes at least aninstruction sequencing unit (ISU) 222 for fetching and orderinginstructions for execution and one or more execution units 224 forexecuting instructions. The instructions executed by execution units 224include instructions that request access to a memory block or cause thegeneration of a request for access to a memory block.

The operation of each processor core 200 is supported by a multi-levelvolatile memory hierarchy having at its lowest level shared systemmemories 108, and at its upper levels one or more levels of cachememory, which in the illustrative embodiment include a store-throughlevel one (L1) cache 226 within each processor core 200 and a level two(L2) cache 230 shared by all processor cores 200 a, 200 b of theprocessing unit 104. L2 cache 230 includes an L2 array and directory234, a master 232 and a snooper 236. Master 232 initiates transactionson local interconnect 114 and system interconnect 110 and accesses L2array and directory 234 in response to memory access (and other)requests received from the associated processor cores 200. Snooper 236snoops operations on local interconnect 114, provides appropriateresponses, and performs any accesses to L2 array and directory 234required by the operations.

Although the illustrated cache hierarchy includes only two levels ofcache, those skilled in the art will appreciate that alternativeembodiments may include additional levels (L3, L4, etc.) of on-chip oroff-chip in-line or lookaside cache, which may be fully inclusive,partially inclusive, or non-inclusive of the contents the upper levelsof cache.

Each processing unit 104 further includes an instance of response logic210, which as discussed further below, implements a portion of thedistributed coherency signaling mechanism that maintains cache coherencywithin data processing system 100. In addition, each processing unit 104includes an instance of forwarding logic 212 for selectively forwardingcommunications between its local interconnect 114 and systeminterconnect 110. Finally, each processing unit 104 includes anintegrated I/O (input/output) controller 214 supporting the attachmentof one or more I/O devices, such as I/O device 216. As discussed furtherbelow, an I/O controller 214 may issue read and write operations on itslocal interconnect 114 and system interconnect 110, for example, inresponse to requests by its attached I/O device(s) 216.

With reference now to FIG. 3, there is illustrated a more detailed blockdiagram of an exemplary embodiment of L2 array and directory 234. Asillustrated, L2 array and directory 234 includes a set associative L2cache array 300 and an L2 cache directory 302 of the contents of L2cache array 300. As in conventional set associative caches, memorylocations in system memories 108 are mapped to particular congruenceclasses within cache arrays 300 utilizing predetermined index bitswithin the system memory (real) addresses. The particular cache linesstored within cache array 300 are recorded in cache directory 302, whichcontains one directory entry for each cache line in cache array 300. Asunderstood by those skilled in the art, each directory entry in cachedirectory 302 comprises at least a tag field 304, which specifies theparticular cache line stored in cache array 300 utilizing a tag portionof the corresponding real address, a state field 306, which indicatesthe coherency state of the cache line, and a LRU (Least Recently Used)field 308 indicating a replacement order for the cache line with respectto other cache lines in the same congruence class.

II. Exemplary Operations and Cache Coherency Protocol

Referring now to FIG. 4, there is depicted a time-space diagram of anexemplary operation on a local or system interconnect 110, 114 of dataprocessing system 100 of FIG. 1. The operation begins when a master 232of an L2 cache 230 (or another master, such as an I/O controller 214)issues a request 402 on an interconnect 110, 114. Request 402 preferablyincludes a transaction type indicating a type of desired access and aresource identifier (e.g., real address) indicating a resource to beaccessed by the request. Common types of requests preferably includethose set forth below in Table I. TABLE I Request Description READRequests a copy of the image of a memory block for query purposes RWITM(Read-With- Requests a unique copy of the image of a memoryIntent-To-Modify) block with the intent to update (modify) it andrequires destruction of other copies, if any DCLAIM (Data Requestsauthority to promote an existing query- Claim) only copy of memory blockto a unique copy with the intent to update (modify) it and requiresdestruction of other copies, if any DCBZ (Data Cache Requests authorityto create a new unique copy Block Zero) of a memory block without regardto its present state and subsequently modify its contents; requiresdestruction of other copies, if any CASTOUT Copies the image of a memoryblock from a higher level of memory to a lower level of memory inpreparation for the destruction of the higher level copy WRITE Requestsauthority to create a new unique copy of a memory block without regardto its present state and immediately copy the image of the memory blockfrom a higher level memory to a lower level memory in preparation forthe destruction of the higher level copy PARTIAL WRITE Requestsauthority to create a new unique copy of a partial memory block withoutregard to its present state and immediately copy the image of thepartial memory block from a higher level memory to a lower level memoryin preparation for the destruction of the higher level copy

Request 402 is received by the snooper 236 of L2 caches 230, as well asthe snoopers 122 a, 122 b of memory controllers 106 a, 106 b (FIG. 1).In general, with some exceptions, the snooper 236 in the same L2 cache230 as the master 232 of request 402 does not snoop request 402 (i.e.,there is generally no self-snooping) because a request 402 istransmitted on local interconnect 114 and/or system interconnect 110only if the request 402 cannot be serviced internally by a processingunit 104. In response to request 402, each snooper 122, 236 receivingrequest 402 provides a respective partial response 406 representing theresponse of at least that snooper to request 402. A snooper 122 within amemory controller 106 determines the partial response 406 to providebased, for example, whether the snooper 122 is responsible for therequest address and whether it has resources available to service therequest. A snooper 236 of an L2 cache 230 may determine its partialresponse 406 based on, for example, the availability of its L2 cachedirectory 302, the availability of a snoop logic instance within snooper236 to handle the request, and the cache state associated with therequest address in L2 cache directory 302.

The partial responses of snoopers 122 and 236 are logically combinedeither in stages or all at once by one or more instances of responselogic 210 to determine a system-wide combined response (CR) 410 torequest 402. Response logic 210 provides combined response 410 to master232 and each snooper 122, 236 via its local interconnect 114 and systeminterconnect 110 to indicate the system-wide response (e.g., success,failure, retry, etc.) to request 402. If CR 410 indicates success ofrequest 402, CR 410 may indicate, for example, a data source for arequested memory block, a cache state in which the requested memoryblock is to be cached by master 232, and whether “cleanup” operationsinvalidating the requested memory block in one or more L2 caches 230 arerequired.

In response to receipt of combined response 410, one or more of master232 and snoopers 122, 236 typically perform one or more operations inorder to service request 402. These operations may include supplyingdata to master 232, invalidating or otherwise updating the coherencystate of data cached in one or more L2 caches 230, performing castoutoperations, writing back data to a system memory 108, etc. As discussedfurther below, if required by request 402, a requested or target memoryblock may be transmitted to or from master 232 before or after thegeneration of combined response 410 by response logic 210.

In the following description, partial response of a snooper 122, 236 toa request and the operations performed by the snooper in response to therequest and/or its combined response will be described with reference towhether that snooper is a Highest Point of Coherency (HPC), a LowestPoint of Coherency (LPC), or neither with respect to the request addressspecified by the request. An LPC is defined herein as a memory device orI/O device that serves as the repository for a memory block. In theabsence of a HPC for the memory block, the LPC holds the true image ofthe memory block and has authority to grant or deny requests to generatean additional cached copy of the memory block. For a typical request inthe data processing system embodiment of FIGS. 1 and 2, the LPC will bethe memory controller 106 for the system memory 108 holding thereferenced memory block. An HPC is defined herein as a uniquelyidentified device that caches a true image of the memory block (whichmay or may not be consistent with the corresponding memory block at theLPC) and has the authority to grant or deny a request to modify thememory block. Descriptively, the HPC may also provide a copy of thememory block to a requestor in response to an operation that does notmodify the memory block. Thus, for a typical request in the dataprocessing system embodiment of FIGS. 1 and 2, the HPC, if any, will bean L2 cache 230.

Still referring to FIG. 4, the HPC, if any, for a memory blockreferenced in a request 402, or in the absence of an HPC, the LPC of thememory block, preferably has the responsibility of protecting thetransfer of ownership of a memory block in response to a request 402during a protection window 404 a. In the exemplary scenario shown inFIG. 4, the snooper 236 that is the HPC for the memory block specifiedby the request address of request 402 protects the transfer of ownershipof the requested memory block to master 232 during a protection window404 a that extends from the time that snooper 236 determines its partialresponse 406 until snooper 236 receives combined response 410. Duringprotection window 404 a, snooper 236 protects the transfer of ownershipby providing partial responses 406 to other requests specifying the samerequest address that prevent other masters from obtaining ownershipuntil ownership has been successfully transferred to master 232. Master232 likewise initiates a protection window 404 b to protect itsownership of the memory block requested in request 402 following receiptof combined response 410.

Although other indicators may be utilized to designate an HPC for amemory block, a preferred embodiment of the present invention designatesthe HPC, if any, for a memory block utilizing selected cache coherencystate(s) within the L2 cache directory 302 of an L2 cache 230. In thispreferred embodiment, the set of cache coherency states, in addition toproviding (1) an indication of whether the cache is the HPC for a memoryblock, also indicate (2) whether the cached copy is unique (i.e., is theonly cached copy) among caches at that memory hierarchy level, (3)whether and when the cache can provide a copy of the memory block to amaster of a request, and (4) whether the cached image of the memoryblock is consistent with the corresponding memory block in the LPC.These four attributes can be expressed, for example, in a variant of thewell-known MESI (Modified, Exclusive, Shared, Invalid) protocolsummarized below in Table II. TABLE II Legal Cache Consistent concurrentstate HPC? Unique? Data source? with LPC? states M yes yes yes, beforeCR no I (& LPC) Me yes yes yes, before CR yes I (& LPC) T yes unknownyes, after CR if no Sr, S, I, none provided (& LPC) before CR Te yesunknown yes, after CR if yes Sr, S, I none provided (& LPC) before CR Srno unknown yes, before CR unknown T, Te, S, I (& LPC) S no unknown nounknown T, Te, Sr, S, I (& LPC) I no n/a no n/a M, Me, T, Te, Sr, S, I(& LPC)

A. Master Operation

With reference now generally to FIGS. 5-17, several high level logicalflowcharts depicting the logical steps involved in servicing requests ofprocessor cores 200 and I/O controllers 214 are given. In particular,FIGS. 5-10 depict the various processes within masters of the requests,and FIGS. 11-17 illustrate operations involved with communicating andservicing the requests via local and system interconnects 114, 110. Aslogical flowcharts, it should be understood that these figures are notintended to convey a strict chronology of operations and that many ofthe illustrated operations may be performed concurrently or in adifferent order than that shown.

Referring first to FIG. 5, there is depicted a high level logicalflowchart of an exemplary method of servicing a read request by aprocessor core. As shown, the process begins at block 500, whichrepresents a master 232 of an L2 cache 230 receiving from an associatedprocessor core 200 a read request specifying a requested memory block.In response to receipt of the read request, master 232 determines atblock 502 whether or not the requested memory block is held in L2 cachedirectory 302 in any of the M, Me, T, Te, Sr or S states. If so, master232 accesses its L2 cache array 300 to obtain the requested memory blockand supplies the requested memory block to the requesting processor core200, as shown at block 514. The process thereafter terminates at block516.

Returning to block 502, in response to a determination to the requestedmemory block is not held in L2 directory 302 in any of the M, Me, T, Te,S, or Sr states, a determination is next made at block 504 whether ornot a castout of an existing cache line is required to accommodate therequested memory block in L2 cache 230. If so, a master 232 initiates acache castout operation, as indicated at block 506 and described ingreater detail below with reference to FIG. 10. Concurrently, master 232issues a bus read operation on interconnects 110, 114, as illustrated atblock 510 and as described in greater detail below with reference toFIG. 11A. If the combined response (CR) of the bus read operation doesnot indicate a “success” at block 512, the bus read operation isrepeated at block 510 until a CR indicating “success” is received. Ifthe CR of the bus read operation indicates “success”, the master 232receives the requested memory block and returns the requested memoryblock (or at least a portion thereof) to the requesting processor coreat block 514. The process thereafter terminates at block 516.

With reference now to FIG. 6, there is illustrated a high level logicalflowchart of an exemplary method of servicing an update request by aprocessor core. The process begins at block 600 in response to receiptby an L2 cache 230 of an update request by an associated one of theprocessor cores 200 within the same processing unit 104. In response tothe receipt of the update request, master 232 of the L2 cache 230accesses L2 cache directory 302 to determine if the memory blockreferenced by the request address specified by the update request iscached within L2 cache 230 in M state, as shown at block 602. If so, themaster 232 updates the memory block in L2 cache 232 with the new datasupplied by the processor core 200, as illustrated at block 604.Thereafter, the update process ends at block 606.

As shown at blocks 610-612, if L2 cache directory 302 instead indicatesthat L2 cache 230 holds the specified memory block in the Me state,master 232 updates the state field 306 for the requested memory block toM state in addition to updating the memory block as shown at block 604.Thereafter, the process terminates at block 606.

As depicted at block 620, if the L2 cache directory 302 indicates thatL2 cache 230 holds the requested memory block in either of the T or Testates, meaning that the L2 cache 230 is the HPC for the requestedmemory block and the requested memory block may possibly be held in oneor more other L2 caches 230, master 232 must gain exclusive access tothe requested memory block in order to perform the requested update tothe memory block. The process by which master 232 gains exclusive accessto the requested memory block is shown at blocks 622-628.

According to this process, master 232 updates the state of the requestedmemory block in the associated state field 306 of L2 cache directory 302to the M state, as depicted at block 622. This upgrade in cache state ispermissible without first informing other L2 caches 230 because, as theHPC, the L2 cache 230 has the authority to award itself exclusive accessto the requested memory block. As illustrated at block 624, master 232provides “downgrade” partial responses to competing DClaim operations,if any, by which other masters are seeking ownership of the requestedmemory block. These partial responses indicate that the other requestersmust reissue any such competing requests as bus RWITM operations. Inaddition, as depicted at block 626, master 232 issues a bus killoperation on interconnects 110, 114 to invalidate any other cachedcopies of the memory block, as described in greater detail below withreference to FIG. 14. Master 232 next determines at block 628 whether ornot the CR for the bus kill operation indicates that the bus killoperation successfully invalidated all other cached copies of therequested memory block or whether additional “cleanup” (i.e.,invalidation of other cached copies) is required. If the CR indicatesthat additional cleanup is not required, the process proceeds to block604, which has been described. If the CR indicates that additionalcleanup is required, the process returns to block 624, which has beendescribed.

Referring now to block 630, if the access to L2 cache directory 302indicates that the requested memory block is held in the Sr or S states,L2 cache 230 is not the HPC for the requested memory block, and master232 must gain ownership of the requested memory block from the HPC, ifany, or in the absence of an HPC, the LPC, prior to updating the memoryblock. Accordingly, master 232 issues a bus DClaim operation oninterconnects 110, 114, as depicted at block 632 and as described belowwith respect to FIG. 13. Master 232 next determines at blocks 634-636whether or not the CR for the bus DClaim operation indicates that itsucceeded, should be retried, or was “downgraded” to a RWITM operation.If the CR indicates that the bus DClaim operation should be retried, theprocess reissues a bus DClaim operation at block 632. If the CRindicates that the bus DClaim operation has been downgraded, master 232issues a bus RWITM operation, as shown at block 652. As shown at block654, master 232 reissues the bus RWITM operation at block 652 until a CRother than “retry” is received.

Following receipt of a CR to the bus RWITM operation other than “retry”at block 654 or in response to a determination at blocks 634-636 thatthe CR to the bus DClaim operation is not “retry” or “downgrade”, master232 additionally determines whether the CR indicates that one or moresnoopers 236 have not invalidated a cached copy of the requested memoryblock. If so, cleanup operations are required, and the process passes toblock 624, 626 and 628, which have been described. If, however, cleanupis not required, master 232 can now update the memory block, as depictedat block 604. Thereafter, the process ends at block 606.

With reference now to block 640, if a negative determination is made atblocks 602, 610, 620 and 630, L2 cache 230 does not hold a valid copy ofthe requested memory block. Accordingly, as indicated at blocks 640 and650, L2 cache 230 performs a cache castout operation if needed toallocate a cache line for the requested memory block. Thereafter, master232 initiates a bus RWITM operation on interconnects 110, 114 to obtainexclusive access to the requested memory block, as illustrated at block652 and following blocks and as described above.

Referring now to FIG. 7, there is illustrated a high level logicalflowchart of an exemplary method of servicing a write request by aprocessor core. The process begins at block 700 in response to receiptby an L2 cache 230 of a write request by an associated one of theprocessor cores 200 within the same processing unit 104. In response tothe receipt of the write request, master 232 of the L2 cache 230accesses its L2 cache directory 302 to determine if the memory blockreferenced by the request address specified by the update request iscached within L2 cache 230 in M state, as shown at block 702. If so, themaster 232 writes the data supplied by the processor core 200 into L2cache array 300, as illustrated at block 704. Thereafter, the processends at block 706.

As shown at blocks 710-712, if L2 cache directory 302 instead indicatesthat L2 cache 230 holds the specified memory block in the Me state,master 232 updates the state field 306 for the requested memory block toM state in addition to writing the memory block as shown at block 704.Thereafter, the process terminates at block 706.

As depicted at block 720, if L2 cache directory 302 indicates that L2cache 230 holds the requested memory block in either of the T or Testates, meaning that the L2 cache 230 is the HPC for the requestedmemory block and the requested memory block may possibly be held in oneor more other L2 caches 230, master 232 must gain exclusive access tothe requested memory block in order to perform the requested write tothe memory block. The process by which master 232 gains exclusive accessto the requested memory block is shown at blocks 722-728.

According to this process, master 232 updates the state of the requestedmemory block in the associated state field 306 of L2 cache directory 302to the M state, as depicted at block 722. As illustrated at block 724,master 232 provides “downgrade” partial responses to competing DClaimoperations to force other requesters for the memory block to reissue anysuch competing requests as bus RWITM operations. In addition, asdepicted at block 726, master 232 issues a bus kill operation oninterconnects 110, 114 to invalidate any other cached copies of thememory block, as described in greater detail below with reference toFIG. 14. Master 232 next determines at block 728 whether or not the CRfor the bus kill operation indicates that the bus kill operationsuccessfully invalidated all other cached copies of the requested memoryblock or whether additional “cleanup” (i.e., invalidation of othercached copies) is required. If the CR indicates that additional cleanupis not required, the process proceeds to block 704, which has beendescribed. If the CR indicates that additional cleanup is required, theprocess returns to block 724, which has been described.

Referring now to block 730, if the access to L2 cache directory 302indicates that the requested memory block is held in the Sr or S states,L2 cache 230 is not the HPC for the requested memory block, and master232 must gain ownership of the requested memory block from the HPC, ifany, or in the absence of an HPC, the LPC, prior to writing the memoryblock. Accordingly, master 232 issues a bus DCBZ operation oninterconnects 110, 114, as depicted at block 732 and as described belowwith respect to FIG. 15. As shown at block 734, master 232 reissues thebus DCBZ operation at block 732 until a CR other than “retry” isreceived. Following receipt of a CR to the bus DCBZ operation other than“retry” at block 734, the process passes to block 728 and followingblocks, which have been described.

With reference now to block 740, if a negative determination is made atblocks 702, 710, 720 and 730, L2 cache 230 does not hold a valid copy ofthe requested memory block. Accordingly, as indicated at block 740 and742, L2 cache 230 performs a cache castout operation if needed toallocate a cache line for the requested memory block. Thereafter, master232 initiates a bus DCBZ operation on interconnects 110, 114, asillustrated at block 732 and following blocks and as described above.

With reference now to FIG. 8, there is depicted a high level logicalflowchart of an exemplary method of performing an I/O read operation. Asshown, the process begins at block 800 in response to receipt by an I/Ocontroller 214 of a processing unit 104 of an I/O read request by anattached I/O device 216. In response to receipt of the I/O read request,I/O controller 214 issues a bus read operation on system interconnect110 via local interconnect 114, as depicted at block 802 and describedbelow with reference to FIG. 11A. As indicated at block 804, I/Ocontroller 214 continues to issue the bus read operation until a CR isreceived indicating “success”. Once the bus read operation succeeds, I/Ocontroller 214 routes the data received in response to the bus readoperation to the requesting I/O device 216, as illustrated at block 806.The process thereafter terminates at block 808.

Referring now to FIG. 9A, there is depicted a high level logicalflowchart of an exemplary method of performing an I/O write operation.As shown, the process begins at block 900 in response to receipt by anI/O controller 214 of a processing unit 104 of an I/O write request byan attached I/O device 216. In response to receipt of the I/O writerequest, I/O controller 214 issues a bus write operation on systeminterconnect 110 via local interconnect 114, as depicted at block 902and described below with reference to FIG. 17A. As indicated at block904, I/O controller 214 continues to issue the bus write operation untila CR other than “retry” is received.

If the CR indicates that no other snooper 236 holds a valid copy of therequested memory block, the process passes from block 904 to block 906and ends at block 908. If, however, I/O controller 214 determines atblock 906 that the CR indicates that at least one stale cached copy ofthe requested memory block may remain, I/O controller 214 performs“cleanup” by downgrading any conflicting DClaim operations snooped onlocal interconnect 114, as shown at block 910, and issuing bus killoperations, as depicted at block 912, until a CR is received at block906 indicating that no stale copies of the requested memory block remainin data processing system 100. Once cleanup operations are complete, theprocess ends at block 908.

With reference now to FIG. 9B, there is illustrated a high level logicalflowchart of an exemplary method of performing an I/O partial writeoperation in accordance with the present invention. As shown, theprocess begins at block 920 in response to receipt by the I/O controller214 of a processing unit 104 of an I/O partial write request (i.e., arequest to write a portion of a memory block) by an attached I/O device216. In response to receipt of the I/O partial write request, I/Ocontroller 214 issues a bus partial write operation on systeminterconnect 110 via local interconnect 114, as depicted at block 922and described below with reference to FIG. 17B. As indicated at block924, I/O controller 214 continues to issue the bus partial writeoperation until a CR other than “retry” is received.

If the CR indicates that no other snooper holds a valid copy of therequested memory block, the process passes from block 924 to block 926and ends at block 928. If, however, I/O controller 214 determines atblock 926 that the CR indicates that at least one stale cached copy ofthe requested memory block may remain, I/O controller 214 performs“cleanup” by downgrading any conflicting DClaim operations, as shown atblock 930, and issuing bus kill operations, as depicted at block 932,until a CR is received at block 926 indicating that no stale cachedcopies of the requested memory block remain in data processing system100. Once cleanup operations are complete, the process ends at block928.

With reference now to FIG. 10, there is illustrated a high level logicalflowchart of an exemplary method by which an L2 cache 230 performs acache castout operation. The illustrated process begins at block 1000when an L2 cache 230 determines that a castout of a cache line isneeded, for example, at block 506 of FIG. 5, block 650 of FIG. 6, orblock 742 of FIG. 7. To perform the castout operation, the L2 cache 230issues a bus castout operation on system interconnect 110 via localinterconnect 114, as shown at block 1002. As indicated at block 1004,the L2 cache 230 issues the bus castout operation until a CR other than“retry” is received. Thereafter, the process ends at block 1006.

Because snoopers 122, 236 all have limited resources for handling theCPU and I/O requests described above, several different levels ofpartial responses and corresponding CRs are possible. For example, if asnooper 122 within a memory controller 106 that is responsible for arequested memory block has a queue available to handle a request, thesnooper 122 may respond with a partial response indicating that it isable to serve as the LPC for the request. If, on the other hand, thesnooper 122 has no queue available to handle the request, the snooper122 may respond with a partial response indicating that is the LPC forthe memory block, but is unable to currently service the request.

Similarly, a snooper 236 in an L2 cache 230 may require an availableinstance of snoop logic 236 and access to L2 cache directory 302 inorder to handle a request. Absence of access to either (or both) ofthese resources results in a partial response (and corresponding CR)signaling an inability to service the request due to absence of arequired resource.

Hereafter, a snooper 122, 236 providing a partial response indicatingthat the snooper has available all internal resources required toservice a request, if required, is said to “affirm” the request. Forsnoopers 236, partial responses affirming a snooped operation preferablyindicate the cache state of the requested or target memory block at thatsnooper 236. A snooper 236 providing a partial response indicating thatthe snooper 236 does not have available all internal resources requiredto service the request may be said to be “possibly hidden.” Such asnooper 236 is “possibly hidden” because the snooper 236, due to lack ofan available instance of snoop logic or access to L2 cache directory302, cannot “affirm” the request in sense defined above and has, fromthe perspective of other masters 232 and snoopers 122, 236, an unknowncoherency state.

B. Interconnect Operations

Referring now to FIGS. 11-17, there are depicted high level logicalflowcharts depicting the manner in which operations on localinterconnect 114 and/or system interconnect 110 are serviced in oneimplementation of data processing system 100. Even though interconnects110, 114 are not necessarily bused interconnects, such operations aretermed “bus operations” (e.g., bus read operation, bus write operation,etc.) herein to distinguish them from cache or CPU (processor)operations.

Referring specifically to FIG. 11A, there is depicted a high levellogical flowchart of an exemplary method of performing a bus readoperation. The process begins at block 1100, for example, at block 510of FIG. 5, with a master 232 of an L2 cache 230 issuing a bus readoperation on interconnects 110, 114. As described above with respect toFIG. 4, the operations performed by the various snoopers 122, 236 inresponse to the bus read operation depend upon the partial responses andCR for the bus read operation. The various partial responses thatsnoopers 122, 236 may provide to distributed response logic 210 arerepresented in FIG. 11A by the outcomes of decision blocks 1102, 1110,1112, 1114, 1120, 1130, 1140, 1142 1144 and 1146. These partialresponses in turn determine the CR for the bus read operation.

If a snooper 236 affirms the bus read operation with a partial responseindicating that the L2 cache 230 containing the snooper 236 holds therequested memory block in either of the M or Me states as shown at block1102, the process proceeds from block 1102 to block 1104. Block 1104indicates the operations of the master in the requesting L2 cache 230and the affirming L2 cache 230 in response to the request. Inparticular, the snooper 236 in the affirming L2 cache 230 updates thecache state of the requested memory block from M to T or from Me to Te.In addition, the snooper 236 in the affirming L2 cache 230 may initiatetransmission of the requested memory block to the requesting L2 cache230 prior to receipt of the CR (i.e., provides “early” data). Uponreceipt, the master 232 in the requesting L2 cache 230 places therequested memory block in L2 cache array 300 in the Sr state. Theprocess ends with distributed response logic 210 generating a CRindicating “success”, as depicted at block 1108.

If, on the other hand, a snooper 236 affirms the bus read operation witha partial response indicating that the L2 cache 230 containing thesnooper 236 holds the requested memory block in either of the T or Testates (block 1110) and an Sr snooper 236 also affirms the bus readoperation (block 1112), the process passes to block 1118. Block 1118represents the Sr snooper 236 updating the cache state of the requestedmemory block to S and initiating transmission of the requested memoryblock to the requesting L2 cache 230 prior to receipt of the CR (i.e.,provides “early” data). Upon receipt, the master 232 in the requestingL2 cache 230 places the requested memory block in L2 cache array 300 inthe Sr state. The process ends with distributed response logic 210generating a CR indicating “success”, as depicted at block 1108.

If the complex of partial responses includes a T or Te snooper 236affirming the bus read operation, no Sr snooper 236 affirming the busread operation, and a snooper 236 providing an partial response (e.g., atype of retry) that indicates an Sr snooper 236 may be possibly hidden,the process passes to block 1116. Block 1116 represents the T or Tesnooper 236 that affirmed the bus read operation initiating transmissionof the requested memory block to the requesting L2 cache 230 afterreceipt of the CR (i.e., provides “late” data) and retaining therequested memory block in the T or Te state. Upon receipt, the master232 in the requesting L2 cache 230 places the requested memory block inL2 cache directory 300 in the S state (since an Sr snooper 236 may behidden and only one Sr snooper 236 is permitted for the requested memoryblock). The process ends with distributed response logic 210 generatinga CR indicating “success”, as depicted at block 1108.

If the complex of partial responses includes a T or Te snooper 236affirming the bus read operation, no Sr snooper 236 affirming the busread operation, and no snooper 236 providing a partial response that maypossibly hide a Sr snooper 236, the process passes to block 1106. Block1106 represents the T or Te snooper 236 that affirmed the bus readoperation initiating transmission of the requested memory block to therequesting L2 cache 230 after receipt of the CR (i.e., provides “late”data) and retaining the requested memory block in the T or Te state.Upon receipt, the master 232 in the requesting L2 cache 230 places therequested memory block in L2 cache array 300 in the Sr state (since noother Sr snooper 236 exists for the requested memory block). The processends with distributed response logic 210 generating a CR indicating“success”, as depicted at block 1108.

Referring now to block 1120, if no M, Me, T or Te snooper 236 affirmsthe bus read operation, but an Sr snooper 236 affirms the bus readoperation, the bus read operation is serviced in accordance with block1122. In particular, the Sr snooper 236 affirming the bus read operationinitiates transmission of the requested memory block to the requestingL2 cache 230 prior to receipt of CR and updates the state of therequested memory block in its L2 cache directory 302 to the S state. Themaster 232 in the requesting L2 cache 230 places the requested memoryblock in L2 cache array 300 in the Sr state. The process ends withdistributed response logic 210 generating a CR indicating “success”, asdepicted at block 1108.

Turning now to block 1130, if no M, Me, T, Te or Sr snooper 236 affirmsthe bus read operation, and further, if no snooper 122 provides apartial response indicating that it is responsible (i.e., the LPC) forthe requested memory block, an error occurs causing processing to halt,as depicted at block 1132. If, on the other hand, no M, Me, T, Te or Srsnooper 236 affirms the bus read operation and a snooper 122 provides apartial response indicating that it is responsible (i.e., the LPC) forthe requested memory block but does not affirm the bus read operation(block 1140), response logic 210 generates a CR indicating “retry”, asdepicted at block 1150. As indicated by decision block 1142, responselogic 210 similarly generates a “retry” CR at block 1150 if a memorycontroller snooper 122 affirms the bus read operation and an L2 cachesnooper 236 provides a partial response indicating that it may hold therequested memory block in one of the M, Me, T, or Te states but cannotaffirm the bus read operation.

With reference now to block 1144, if no M, Me, T, Te or Sr snooper 236affirms the bus read operation, no M, Me, T, Te snooper 236 is possiblyhidden, a snooper 122 affirms the bus read operation, and a Sr snooper236 may be possibly hidden, response logic 210 generates a CR indicating“success”, as depicted at block 1108. In response to the CR, theaffirming LPC snooper 122 provides the requested memory block to therequesting L2 cache 230, which then holds the requested memory block inthe S state, as depicted at block 1152. Assuming these same conditionsexcept for the absence of a possibly hidden Sr snooper 236, therequesting L2 cache 230 obtains the requested memory block in a statereflecting whether or not an S snooper 236 is possibly hidden. If thepartial responses indicate that an S snooper 236 is not possibly hidden,the requesting L2 cache 236 obtains the requested memory block in the Mestate, as depicted at block 1148. If no snooper 236 provides a partialresponse indicating an S snooper may be hidden, the requesting L2 cache230 holds the requested memory block in the Sr state, as shown at block1154.

With reference now to FIG. 12A, there is illustrated a high levellogical flowchart of an exemplary method of performing a bus RWITMoperation. The process begins at block 1200, for example, with a master232 of an L2 cache 230 issuing a bus RWITM operation on interconnects110, 114 at block 652 of FIG. 6. As described above with respect to FIG.4, the operations performed by the various snoopers 122, 236 in responseto the bus RWITM operation depend upon the partial responses and CR forthe bus RWITM operation. The various partial responses that snoopers122, 236 may provide to distributed response logic 210 are representedin FIG. 12A by the outcomes of decision blocks 1202, 1210, 1212, 1220,1230, 1232, 1234 and 1238. These partial responses in turn determine theCR for the bus RWITM operation.

If a snooper 236 affirms the bus RWITM operation with a partial responseindicating that the L2 cache 230 containing the snooper 236 holds therequested memory block in either the M or Me state as shown at block1202, the process proceeds from block 1202 to block 1204. Block 1204indicates the operations of the requesting L2 cache 230 and theaffirming L2 cache 230 in response to the request. In particular, thesnooper 236 in the affirming L2 cache 230 updates the cache state of therequested memory block from the M state to the I state and may initiatetransmission of the requested memory block to the requesting L2 cache230 prior to receipt of the CR (i.e., provides “early” data). Uponreceipt, the master 232 in the requesting L2 cache 230 places therequested memory block in L2 cache array 300 in the M state. The processends with distributed response logic 210 generating a CR indicating“success”, as depicted at block 1206.

If, on the other hand, a snooper 236 affirms the bus RWITM operationwith a partial response indicating that the L2 cache 230 containing thesnooper 236 holds the requested memory block in either the T or Te stateas shown at block 1210 and no Sr snooper 236 affirms the bus RWITMoperation as shown at block 1212, the process passes to block 1214.Block 1214 represents the T or Te snooper 236 that affirmed the busRWITM request initiating transmission of the requested memory block tothe requesting L2 cache 230 in response to receipt of the CR (i.e.,provides “late” data). In response to receipt of the requested memoryblock, the master 232 in the requesting L2 cache 230 holds the cachestate of the requested memory block to the M state. All affirmingsnoopers 236 update their respective cache states for the requestedmemory block to I. As indicated at block 1216 and as described below,the CR generated by distributed response logic 210 depends upon whetherthe partial responses indicate that an S or Sr snooper 236 is possiblyhidden.

Returning to blocks 1210 and 1212, if the complex of partial responsesincludes a T or Te snooper 236 and an Sr snooper 236 affirming the busRWITM operation, the process passes to block 1215. Block 1215 representsthe Sr snooper 236 that affirmed the bus RWITM request initiatingtransmission of the requested memory block to the requesting L2 cache230 prior to receipt of the CR (i.e., providing “early” data). Inresponse to receipt of the requested memory block, the master 232 in therequesting L2 cache 230 holds the cache state of the requested memoryblock to the M state. All affirming snoopers 236 update their respectivecache states for the requested memory block to I. As further illustratedat blocks 1216 and 1218, the data transfer to the requesting L2 cache ispermitted even in the presence of partial response(s) indicating thepresence of a possibly hidden S or Sr snooper 236. If no hidden S or Srsnoopers 236 exist, the process ends with distributed response logic 210generating a CR indicating success, as depicted at block 1206. If, onthe other hand, at least one partial response indicating the presence ofa possibly hidden S or Sr snooper 236 was given in response to the busRWITM operation, distributed response logic 210 generates a CRindicating “cleanup”, meaning that the requesting L2 cache 230 mustissue one or more bus kill operations to invalidate the requested memoryblock in any such hidden S or Sr snooper 236, as described above withrespect to blocks 628, 624 and 626 of FIG. 6.

Turning now to block 1220, if no M, Me, T, or Te snooper 236 affirms thebus RWITM operation, and further, if no snooper 122 provides a partialresponse indicating that it is responsible (i.e., the LPC) for therequested memory block, an error occurs causing processing to halt, asdepicted at block 1222. If, on the other hand, no M, Me, T, or Tesnooper 236 affirms the bus RWITM operation and a snooper 122 provides apartial response indicating that it is responsible (i.e., the LPC) forthe requested memory block but does not affirm the bus RWITM operation(block 1230), the bus RWITM operation is handled in accordance withblocks 1238, 1240, 1242 and 1244. In particular, blocks 1238-1240 depictthat if the complex of partial responses includes an Sr snooper 236affirming the bus RWITM request and thus providing early data, therequesting L2 cache 230 discards the copy of the requested memory blockprovided by the Sr snooper 236 in response to the CR. The copy of therequested memory block is discarded because no HPC is available tomediate the transfer of HPC status to the requesting master 232. Inaddition, as shown at blocks 1242 and 1244, each affirming snooper 236invalidates the requested memory block in its respective L2 cachedirectory 302 (block 1242), and response logic 210 generates a CRindicating “retry” (block 1244). As indicated by decision block 1232,the bus RWITM operation is also handled in accordance with blocks1238-1244 if a memory controller snooper 122 affirms the bus RWITMoperation (block 1230) and an L2 cache snooper 236 provides a partialresponse indicating that a M, Me, T, or Te snooper 236 may be possiblyhidden.

With reference now to block 1234, if no M, Me, T, or Te snooper 236affirms the bus RWITM operation or is possibly hidden, a snooper 122affirms the bus RWITM operation, and a Sr snooper 236 affirms the busRWITM operation, the bus RWITM operation is serviced in accordance withblock 1215, which is described above. Assuming these same conditionsexcept for the absence of an Sr snooper 236 affirming the request, thebus RWITM operation is serviced in accordance with block 1236 andfollowing blocks. In particular, in response to the CR, the LPC snooper122 provides the requested memory block to the requesting L2 cache 230,which obtains the requested memory block in the M state, and allaffirming snoopers 236 invalidate their respective copies of therequested memory block, if any. If the partial responses indicate an Sor Sr snooper 236 is possibly hidden (block 1216), the requesting L2cache 236 receives a “cleanup” CR indicating that it must invalidate anyother valid cached copies of the requested memory block (block 1218). Ifno S or Sr snoopers 236 are possibly hidden by incomplete partialresponses, response logic 210 generates a “success” CR, as depicted atblock 1206.

Referring now to FIG. 13, there is depicted a high level logicalflowchart of an exemplary method of performing a bus DClaim operation inaccordance with the present invention. The process begins at block 1300,for example, with a master 232 of an L2 cache 230 issuing a bus DClaimoperation on interconnects 110, 114 at block 632 of FIG. 6. The variouspartial responses that snoopers 122, 236 may provide to distributedresponse logic 210 in response to the bus DClaim operation arerepresented in FIG. 13 by the outcomes of decision blocks 1302, 1310,1314, 1320, 1330 and 1334. These partial responses in turn determinewhat CR response logic 210 generates for the bus DClaim operation.

As shown at block 1302, if any snooper 236 issues a partial responsedowngrading the bus DClaim operation to a bus RWITM operation asillustrated, for example, at block 624 of FIG. 6, distributed responselogic 210 generates a CR indicating “downgrade”, as shown at block 1304.As shown at block 1303, each affirming snooper 236 other than thedowngrading snooper 236 invalidates its respective copy of the requestedmemory block, if any. In response to this CR, the master 232 of the busDClaim operation must next attempt to gain ownership of the requestedmemory block utilizing a bus RWITM operation, as depicted at blocks 636and 652 of FIG. 6.

If a snooper 236 affirms the bus DClaim operation with a partialresponse indicating that the L2 cache 230 containing the snooper 236holds the requested memory block in either the T or Te state as shown atblock 1310, the process passes to block 1312. Because no data transferis required in response to a bus DClaim operation, block 1312 indicatesthat the master 232 in the requesting L2 cache 230 updates the state ofits copy of the requested memory block in L2 cache directory 302 to theM state. All affirming snoopers 236 update their respective cache statesfor the requested memory block to I. As shown at blocks 1314 and 1316,if the partial responses indicate that no hidden S or Sr snoopers 236exist, the process ends with distributed response logic 210 generating aCR indicating “success”. If, on the other hand, at least one partialresponse indicating the presence of a possibly hidden S or Sr snooper236 was given in response to the bus DClaim operation, distributedresponse logic 210 generates a CR indicating “cleanup” (block 1318),meaning that the requesting L2 cache 230 must issue one or more bus killoperations to invalidate the requested memory block in any such hidden Sor Sr snooper 236, as described above with respect to blocks 628, 624and 626 of FIG. 6.

Turning now to block 1320, if no T or Te snooper 236 affirms the busDClaim operation, and further, if no snooper 122 provides a partialresponse indicating that it is responsible (i.e., the LPC) for therequested memory block, an error occurs causing processing to halt, asdepicted at block 1322. If, on the other hand, no T or Te snooper 236affirms the bus DClaim operation and a snooper 122 provides a partialresponse indicating that it is responsible (i.e., the LPC) for therequested memory block but does not affirm the bus DClaim operation(block 1330), each affirming snooper 236 invalidates its respective copyof the requested memory block, if any (block 1331), and response logic210 generates a CR indicating “retry”, as depicted at block 1332. Asindicated by decision block 1334, response logic 210 similarly generatesa “retry” CR at block 1332 and each affirming snooper 236 invalidatesits respective copy of the requested memory block, if any (block 1331)if a memory controller snooper 122 affirms the bus DClaim operation(block 1330) and an L2 cache snooper 236 provides a partial responseindicating that a T or Te snooper 236 may be possibly hidden.

As depicted at block 1334, if no T or Te snooper 236 affirms the busDClaim operation or is possibly hidden and a snooper 122 affirms the busDClaim operation, the bus DClaim operation is serviced in accordancewith block 1312, which is described above.

With reference now to FIG. 14, there is illustrated a high level logicalflowchart of an exemplary method of performing a bus kill operation inaccordance with the present invention. As depicted, the process beginsat block 1400, for example, with the master 232 of an L2 cache 230issuing a bus kill operation on interconnects 110, 114, for example, atblock 626 of FIG. 6, block 726 of FIG. 7, block 912 of FIG. 9A, or block932 of FIG. 9B The various partial responses that snoopers 122, 236 mayprovide to distributed response logic 210 in response to the bus killoperation are represented in FIG. 14 by the outcomes of decision blocks1402 and 1406. These partial responses in turn determine what CRresponse logic 210 generates for the bus kill operation.

In particular, as depicted at blocks 1402 and 1404, any snooper 236affirming the bus kill operation in any of the M, Me, T, Te, Sr or Sstates invalidates its copy of the requested memory block without anytransmission of data in response to receipt of the CR. As further shownat blocks 1406, 1408 and 1410, response logic 210 generates a CRindicating “cleanup” if any snooper 236 provided a partial response notaffirming the bus kill operation and otherwise generates a CR indicating“success”.

Referring now to FIG. 15, there is depicted a high level logicalflowchart of an exemplary method of performing a bus DCBZ operation inaccordance with the present invention. The process begins at block 1500,for example, with the master 232 of an L2 cache 230 issuing a bus DCBZoperation on interconnects 110, 114 at block 732 of FIG. 7. The variouspartial responses that snoopers 122, 236 may provide to distributedresponse logic 210 are represented in FIG. 15 by the outcomes ofdecision blocks 1502, 1510, 1514, 1520, 1530 and 1534. These partialresponses in turn determine the CR for the bus DCBZ operation.

If a snooper 236 affirms the bus DCBZ operation with a partial responseindicating that the L2 cache 230 containing the snooper 236 holds therequested memory block in either of the M or Me states as shown at block1502, the process proceeds to block 1504. Block 1504 indicates theoperations of the requesting L2 cache 230 and the affirming L2 cache 230in response to the request. In particular, the master 232 in therequesting L2 cache 230 updates the cache state of the requested memoryblock to the M state (no data is transferred), and the snooper 236 inthe affirming L2 cache 230 updates the cache state of the requestedmemory block to the I state. The process ends with distributed responselogic 210 generating a CR indicating “success”, as depicted at block1506.

If, on the other hand, a snooper 236 affirms the bus DCBZ operation witha partial response indicating that the L2 cache 230 containing thesnooper 236 holds the requested memory block in either the T or Te stateas shown at block 1510, the process passes to block 1512. Block 1512represents each valid affirming snooper 236 invalidating its respectivecopy of the requested memory block and the master 232 in the requestingL2 cache 230 updating the cache state of its copy of the requestedmemory block to the M state. As further illustrated at blocks 1514-1516,if at least one partial response indicating the presence of a possiblyhidden S or Sr snooper 236 was given in response to the bus DCBZoperation, distributed response logic 210 generates a CR indicating“cleanup”. If the partial responses indicate that no S or Sr snooper 236was possibly hidden, distributed response logic 210 provides a CRindicating “success” as shown at block 1506.

Turning now to block 1520, if no M, Me, T, or Te snooper 236 affirms thebus DCBZ operation, and further, if no snooper 122 provides a partialresponse indicating that it is responsible (i.e., the LPC) for therequested memory block, an error occurs causing processing to halt, asdepicted at block 1522. If, on the other hand, no M, Me, T, or Tesnooper 236 affirms the bus DCBZ operation and a snooper 122 provides apartial response indicating that it is responsible (i.e., the LPC) forthe requested memory block but does not affirm the bus DCBZ operation(block 1530), each affirming snooper 236 invalidates its respective copyof the requested memory block, if any (block 1531), and response logic210 generates a CR indicating “retry”, as depicted at block 1532. A“retry” CR is similarly generated at block 1532 and each affirmingsnooper 236 invalidates its respective copy of the requested memoryblock, if any (block 1531) if no M, Me, T, or Te snooper 236 affirms theoperation, or if LPC snooper 222 affirms the bus DCBZ operation (block1530) and a M, Me, T or Te snooper 236 is possibly hidden (block 1534).As further indicated by decision block 1534, if a memory controllersnooper 122 affirms the bus DCBZ operation (block 1530) and no L2 cachesnooper 236 provides a partial response indicating that an M, Me, T, orTe snooper 236 may be possibly hidden (block 1534), the bus DCBZoperation is serviced as described above with reference to block 1512and following blocks.

With reference now to FIG. 16, there is illustrated a high level logicalflowchart of an exemplary method of performing a bus castout operationin accordance with the present invention. The process begins at block1600, for example, with a master 232 of an L2 cache 230 issuing a buscastout operation on interconnects 110, 114, for example, at block 1002of FIG. 10, block 742 of FIG. 7, block 650 of FIG. 6, or block 506 ofFIG. 5 The various partial responses that snoopers 122, 236 may provideto distributed response logic 210 are represented in FIG. 16 by theoutcomes of decision blocks 1602, 1610 and 1620. These partial responsesin turn determine the CR for the bus castout operation.

If a snooper 236 affirms the bus castout operation with a partialresponse indicating that the L2 cache 230 containing the snooper 236holds the requested memory block in any of the M, Me, T or Te states asshown at block 1602, an error halting processing occurs, as indicated atblock 1604, because the memory block being castout can have only one HPC(i.e., the requesting L2 cache 230).

As depicted at block 1620, if no M, Me, T, or Te snooper 236 affirms thebus castout operation, and further, if no snooper 122 provides a partialresponse indicating that it is responsible (i.e., the LPC) for therequested memory block (block 1610), an error occurs causing processingto halt, as depicted at block 1612. If, however, no M, Me, T, or Tesnooper 236 affirms the bus castout operation and a snooper 122 providesa partial response indicating that it is responsible (i.e., the LPC) forthe requested memory block but does not affirm the bus castout operation(block 1620), response logic 210 generates a CR indicating “retry”, asdepicted at block 1630, because the LPC must be available to receive thecastout memory block. If a memory controller snooper 122 is found andaffirms the bus castout operation (blocks 1610 and 1620) and no M, Me, Tor Te snooper 236 affirms the bus castout operation (block 1602), therequesting L2 cache 230 invalidates the memory block within its cachedirectory 302 and transmits the memory block to the LPC, as depicted atblock 1622. In addition, response logic 210 generates a CR indicating“success”, as illustrated at block 1624.

Referring now to FIG. 17A, there is depicted a high level logicalflowchart of an exemplary method of performing a bus write operation.The process begins at block 1700, for example, with an I/O controller214 issuing a bus write operation on interconnects 110, 114 at block 902of FIG. 9A. The various partial responses that snoopers 122, 236 mayprovide to distributed response logic 210 are represented in FIG. 17A bythe outcomes of decision blocks 1710, 1720, 1724 and 1728. These partialresponses in turn determine the CR for the bus write operation.

As depicted at block 1710, if no snooper 122 provides a partial responseindicating that it is responsible (i.e., the LPC) for the requestedmemory block, an error occurs causing processing to halt, as depicted atblock 1712. If, however, a snooper 122 provides a partial responseindicating that it is responsible (i.e., the LPC) for the requestedmemory block but does not affirm the bus write operation (block 1720),each affirming snooper 236 other than the downgrading snooper 236invalidates its respective copy of the requested memory block, if any(block 1721), and response logic 210 generates a CR indicating “retry”(block 1722) because the LPC must be available to receive the requestedmemory block. Response logic 210 similarly generates a “retry” CR if amemory controller snooper 122 affirms the bus castout operation but apartial response indicates that a M, Me, T or Te snooper 236 may bepossibly hidden (blocks 1724 and 1722). In this case, a “retry” CR isgenerated so that the bus write operation only succeeds when no staleHPC copy of the requested memory block remains in the system.

Referring again to block 1724, assuming that a snooper 122 affirms thebus write operation as the LPC and no partial responses are generatedthat indicate that a M, Me, T or Te snooper 236 may possibly be hidden,the requesting I/O controller 214 transmits the requested memory blockto the LPC snooper 122, and snoopers 236, if any, affirming the buswrite operation invalidate their respective copies of the requestedmemory block (block 1726). As shown at blocks 1728 and 1730, if thepartial responses indicate that no hidden S or Sr snoopers 236 exist,the process ends with distributed response logic 210 generating a CRindicating “success”. If, on the other hand, at least one partialresponse indicating the presence of a possibly hidden S or Sr snooper236 was given in response to the bus write operation, distributedresponse logic 210 generates a CR indicating “cleanup” (block 1732),meaning that the requesting I/O controller 214 must issue one or morebus kill operations to invalidate the requested memory block in any suchhidden S or Sr snooper 236, as described above with respect to blocks906, 910 and 912 of FIG. 9A.

With reference now to FIG. 17B, there is depicted a high level logicalflowchart of an exemplary method of performing a bus partial writeoperation in accordance with the present invention. The process beginsat block 1740, for example, with an I/O controller 214 issuing a buspartial write operation on interconnects 110, 114 at block 922 of FIG.9B. The various partial responses that snoopers 122, 236 may provide todistributed response logic 210 are represented in FIG. 17B by theoutcomes of decision blocks 1750, 1760, 1762, 1763, 1764 and 1768. Thesepartial responses in turn determine the CR for the bus partial writeoperation.

As depicted at block 1750, if no snooper 122 provides a partial responseindicating that it is responsible (i.e., the LPC) for the requestedpartial memory block, an error occurs causing processing to halt, asdepicted at block 1752. If, however, a snooper 122 provides a partialresponse indicating that it is responsible (i.e., the LPC) for therequested partial memory block but does not affirm the bus partial writeoperation (block 1760), each affirming snooper 236 invalidates itsrespective copy of the requested memory block, if any (block 1765), andresponse logic 210 generates a CR indicating “retry”, as depicted atblock 1780. A “retry” CR is generated because the LPC must be availableto receive the partial memory block. Response logic 210 similarlygenerates a “retry” CR (block 1780) and each affirming snooper 236invalidates its respective copy of the requested memory block, if any(block 1765) if a memory controller snooper 122 affirms the bus partialwrite operation (block 1760), no M, Me, T, or Te snooper 236 affirms thebus partial write operation (block 1762), but a partial responseindicates that a M, Me, T or Te snooper 236 may be possibly hidden(block 1764).

If a memory controller snooper 122 affirms the bus partial writeoperation and an M or T snooper 236 affirms the bus partial writeoperation (block 1762), the M or T snooper 236 initiates a cache castoutoperation of the cache line containing the partial memory block, asdepicted at block 1774 and as described in detail above with respect toFIG. 10. This castout operation preserves possibly modified data withinthe memory block that may not be overwritten by the bus partial writeoperation. Each other snooper 236 affirming the bus partial writeoperation, if any, invalidates its respective copy of the memory block,as shown at block 1776. As further illustrated at block 1780, responselogic 210 generates a “retry” CR. Thus, a “retry” CR is generated, asdepicted at block 1780, so that the bus partial write operation onlysucceeds when no HPC copy of the requested partial memory block remainsin the system.

The bus partial write operation is handled similarly if a memorycontroller snooper 122 affirms the bus partial write operation and an Meor Te snooper 236 affirms the bus partial write operation (block 1763),except that no castout is required because the memory block isunmodified. Accordingly, the Me or Te snooper 236 affirming the buspartial write operation invalidates its copy of the target memory blockat block 1765, and response logic 210 provides a “retry” CR, as depictedat block 1780.

Referring again to block 1764, assuming that a snooper 122 affirms thebus partial write operation as the LPC, no M, Me, T or Te snooper 236affirms the bus partial write operation, and no partial responses aregenerated that indicate that a M, Me, T or Te snooper 236 may bepossibly hidden, the requesting I/O controller 214 transmits the partialmemory block to the LPC snooper 122, and snoopers 236, if any, affirmingthe bus write operation invalidate their respective copies of therequested memory block (block 1766). As shown at blocks 1768 and 1770,if the partial responses indicate that no S or Sr snooper 236 ispossibly hidden, the process ends with distributed response logic 210generating a CR indicating “success”. If, on the other hand, at leastone partial response indicating the presence of a possibly hidden S orSr snooper 236 was given in response to the bus partial write operation,distributed response logic 210 generates a CR indicating “cleanup”(block 1772), meaning that the requesting I/O controller 214 must issueone or more bus kill operations to invalidate the requested memory blockin any such hidden S or Sr snooper 236, as described above with respectto blocks 926, 930 and 932 of FIG. 9B.

III. Data Delivery Domains

Broadcast-based data processing systems, such as that described indetail above, handle both cache coherency and data delivery throughbroadcast communication on a system interconnect and each localinterconnect. As compared with systems of alternative architectures andlike scale, broadcast-based systems tend to offer decreased accesslatency and better data handling and coherency management of sharedmemory blocks.

As broadcast-based system scale in size, traffic volume on the systeminterconnect is multiplied, meaning that system cost rises sharply withsystem scale as more bandwidth is required for communication over thesystem interconnect. That is, a system with m processor cores, eachhaving an average traffic volume of n transactions, has a traffic volumeof m×n, meaning that traffic volume in broadcast-based systems scalesmultiplicatively not additively. Beyond the requirement forsubstantially greater interconnect bandwidth, an increase in system sizehas the secondary effect of increasing some access latencies. Forexample, the access latency of read data is limited, in the worst case,by among other things the latency of the furthest away lower level cacheholding the requested memory block in state from which it will supplydata.

In order to reduce system interconnect bandwidth requirements and accesslatencies while still retaining the advantages of a broadcast-basedsystem, several improvements to broadcast-based coherency management anddata delivery mechanisms will now be introduced. The first of theseenhancements is a modification to the partial response rules describedabove in order to reduce worst case access latency for shared data.

As noted above, the read access latency for shared data can be limitedin the worst case by the latency for the furthest away (and thereforehighest latency) L2 cache holding the requested memory block in the Srstate. As described above with respect to blocks 1118 and 1122 of FIG.11A and block 1215 of FIG. 12A, an Sr snooper 236 is the data source forthe memory block requested by bus read operations and bus RWITMoperation that is affirms. Ideally, it would be desirable to minimizedata access latency by decreasing the average distance between therequesting L2 cache 230 and an affirming L2 cache 230 containing an Srsnooper 236. One technique for reducing the average distance between arequesting L2 cache 230 and an Sr snooper 236 is to permit multipleconcurrent Sr snoopers 236 for a single requested memory block to bedistributed throughout SMP data processing system 100. In this manner,the average data access latency is reduced by supplying a shared memoryblock to a requesting L2 cache 230 from a nearby Sr snooper 236.

In order to implement multiple concurrent and distributed sources forshared memory blocks in an SMP data processing system, such as dataprocessing system 100, two issues must be addressed. First, some rulegoverning the creation of Sr snoopers 236 must be implemented. Second,there must be a rule governing which Sr snooper 236, if any, provides ashared memory block to a requesting L2 cache 230 in response to a busread operation or bus RWITM operation.

According to the present invention, both of these issues are addressedthrough the implementation of data sourcing domains. In particular, eachdomain within a SMP data processing system, where a domain is defined toinclude one or more lower level (e.g., L2) caches that participate inresponding to data requests, is permitted to include only one cachehierarchy that holds a memory block in the Sr state at a time. Thatcache hierarchy, if present when a bus read-type (e.g., read or RWITM)operation is initiated by a requesting lower level cache in the samedomain, is responsible for sourcing the requested memory block to therequesting lower level cache. Although many different domain sizes maybe defined, in data processing system 100 of FIG. 1, it is convenient ifeach processing node 102 (i.e., MCM) is considered a data sourcingdomain.

In at least some embodiments, the designation of an Sr snooper withinthe same domain as the requesting master can be designated with anexplicit cache state such as “SL”, where the “L” indicates a “local”cache in the same domain. In such embodiments, the SL cache state wouldpreferably replace the Sr cache state described above. In otherembodiments, the designation of a “local” Sr snooper within the samedomain as the requesting master can be implemented simply by modifyingthe response behavior of Sr snoopers. For example, assuming that eachbus operation includes a scope indicator indicating whether the busoperation has crossed a domain boundary (e.g., an explicit domainidentifier of the master or a single local/not local bit), a lower levelcache holding a shared memory block in the Sr state can provide apartial response affirming the request in the Sr state only for requestsby masters within the same data sourcing domain and provide partialresponses indicating the S state for all other requests. In suchembodiments the response behavior can be summarized as shown in TableIII, where prime (′) notation is utilized to designate partial responsesthat may differ from the actual cache state of the memory block. TABLEIII Partial response Domain of (adequate Partial response master ofread- Cache state resources (adequate resources type request indirectory available) unavailable) “local” (i.e., Sr Sr′ affirm Sr′possibly hidden within same domain) “remote” (i.e., Sr S′ affirm S′possibly hidden not within same domain) “local” (i.e., S S′ affirm S′possibly hidden within same domain) “remote” (i.e., S S′ affirm S′possibly hidden not within same domain)

Assuming the response behavior set forth above in Table III, the averagedata latency for shared data can be significantly decreased byincreasing the number of shared copies of memory blocks distributedwithin an SMP data processing system that may serve as data sources.Advantageously, this enhancement to the data delivery mechanism can beimplemented utilizing the processes for servicing bus read and bus RWITMoperations described in detail above with reference to FIGS. 11A and12A. However, to avoid confusion between the partial responses and theunderlying cache states, these processes are illustrated in FIGS. 11Band 12B utilizing like reference numerals to designate like steps andutilizing the prime notation employed in Table III to designate partialresponses.

IV. Coherency Domains

While the implementation of data delivery domains as described aboveimproves data access latency, this enhancement does not address the m×nmultiplication of traffic volume as system scale increases. In order toreduce traffic volume while still maintaining a broadcast-basedcoherency mechanism, preferred embodiments of the present inventionadditionally implement coherency domains, which like the data deliverydomains hereinbefore described, can conveniently (but are not requiredto be) implemented with each processing node 102 forming a separatecoherency domain. Data delivery domains and coherency domains can be,but are not required to be coextensive, and for the purposes ofexplaining exemplary operation of data processing system 100 willhereafter be assumed to have boundaries defined by processing nodes 102.

The implementation of coherency domains reduces system traffic bylimiting inter-domain broadcast communication over system interconnect110 in cases in which requests can be serviced with participation byfewer than all coherency domains. For example, if processing unit 104 aof processing node 102 a has a bus read operation to issue, thenprocessing unit 104 a may elect to first broadcast the bus readoperation to all participants within its own coherency domain (e.g.,processing node 102 a), but not to participants in other coherencydomains (e.g., processing node 102 b). A broadcast operation transmittedto only those participants within the same coherency domain as themaster is defined herein as a “local operation”. If the local bus readoperation can be serviced within the coherency domain of processing unit104 a, then no further broadcast of the bus read operation is performed.If, however, the partial responses and combined response to the localbus read operation indicate that the bus read operation cannot beserviced solely within the coherency domain of processing node 102 a,the scope of the broadcast may then be extended to include, in additionto the local coherency domain, one or more additional coherency domains.

In a basic implementation, two broadcast scopes are employed: a “local”scope including only the local coherency domain and a “global” scopeincluding all of the other coherency domains in the SMP data processingsystem. Thus, an operation that is transmitted to all coherency domainsin an SMP data processing system is defined herein as a “globaloperation”. Importantly, regardless of whether local operations oroperations of more expansive scope (e.g., global operations) areemployed to service operations, cache coherency is maintained across allcoherency domains in the SMP data processing system.

In a preferred embodiment, the scope of an operation is indicated in abus operation by a local/global indicator, which in one embodiment maycomprise a 1-bit flag. Forwarding logic 212 within processing units 104preferably determines whether or not to forward an operation receivedvia local interconnect 114 onto system interconnect 110 based upon thesetting of the local/global indicator.

A. Master Operations with Coherency Domains

Referring now to FIG. 18, there is depicted a high level logicalflowchart of an exemplary method of servicing a read request by aprocessor core in a data processing system implementing coherencydomains in accordance with preferred embodiments of the presentinvention. In such embodiments, the process given in FIG. 18 isimplemented in lieu of the process depicted in FIG. 5 and describedabove.

As shown, the process begins at block 1800, which represents a master232 in an L2 cache 230 receiving a read request from an associatedprocessor core 200. In response to receipt of the read request, master232 determines at block 1802 whether or not the requested memory blockis held in L2 cache directory 302 in any of the M, Me, T, Te, Sr or Sstates. If so, master 232 accesses L2 cache array 300 to obtain therequested memory block and supplies the requested memory block to therequesting processor core 200, as shown at block 1824. The processthereafter terminates at block 1826.

Returning to block 1802, if the requested memory block is not held in L2directory 302 in any of the M, Me, T, Te, S, or Sr states, adetermination is also made at block 1804 whether or not a castout of anexisting cache line is required to accommodate the requested memoryblock in L2 cache 230. In one embodiment, a castout operation isrequired at block 1804 and at similar blocks in succeeding figures ifthe memory block selected as a victim for eviction from the L2 cache 230of the requesting processor is marked in L2 directory 302 as being ineither the M or T coherency state. In response to a determination atblock 1804 that a castout is required, a cache castout operation isperformed, as indicated at block 1806. Concurrently, the master 232determines at block 1810 whether or not to issue a bus read operation asa local operation or a global operation.

In a first embodiment in which each bus operation is initially issued asa local operation and issued as a local operation only once, thedetermination depicted at block 1810 (and like determinations insucceeding figures) can simply represent a determination by the masterof whether or not the bus read operation has previously been issued as alocal bus read operation. In a second alternative embodiment in whichlocal bus operations can be retried, the determination depicted at block1810 can represent a determination by the master of whether or not thebus read operation has previously been issued more than a thresholdnumber of times. In a third alternative embodiment, the determinationmade at block 1810 can be based upon a prediction by the master ofwhether or not a local operation is likely to be successful (e.g., islikely to find an HPC in the local coherency domain).

In response to a determination at block 1810 to issue a global bus readoperation rather than a local bus read operation, the process proceedsfrom block 1810 to block 1820, which is described below. If, on theother hand, a determination is made at block 1810 to issue a local busread operation, master 232 initiates a local bus read operation on itslocal interconnect 114, as illustrated at block 1812 and described belowwith reference to FIG. 24. As noted above, the local bus read operationis broadcast only within the local coherency domain (e.g., processingnode 102) containing master 232. If master 232 receives a CR indicating“success” (block 1814), master 232 receives the requested memory blockand returns the requested memory block (or at least a portion thereof)to the requesting processor core 200, as shown at block 1824.Thereafter, the process ends at block 1826.

Returning to block 1814, if the CR for the local bus read operation doesnot indicate “success”, master 232 makes a determination at block 1816whether or not the CR definitively indicates that the bus read operationcannot be serviced within the local coherency domain and shouldtherefore be reissued as a global bus read operation. If so (e.g., if anL2 cache 230 in another coherency domain holds the requested memoryblock in the M state or Me state), the process passes to block 1820,which is described below. If, on the other hand, the CR does notdefinitively indicate that the bus read operation cannot be servicedwithin the local coherency domain, the process returns from block 1816to block 1810, which illustrates master 232 again determining whether ornot to issue a local bus read operation. In this case, master 232 mayemploy in the determination any additional information provided by theCR. Following block 1810, the process passes to either block 1812, whichis described above, or to block 1820.

Block 1820 depicts master 230 issuing a global bus read operation asdescribed above with reference to FIG. 11B. If the CR of the global busread operation does not indicate “success” at block 1822, master 232repeats the global bus read operation at block 1820 until a CRindicating “success” is received. If the CR of the global bus readoperation indicates “success”, the master 232 receives the requestedmemory block and returns the requested memory block (or at least aportion thereof) to the requesting processor core 200 at block 1824. Theprocess thereafter terminates at block 1826.

Thus, assuming affinity between processes and their data within the samecoherency domain, operations, such as the CPU read operation depicted inFIG. 18, can frequently be serviced utilizing broadcast communicationlimited in scope to the coherency domain of the requesting master. Thecombination of data delivery domains as hereinbefore described andcoherency domains thus improves not only data access latency, but alsoreduces traffic on the system interconnect (and other localinterconnects) by limiting the scope of broadcast communication.

With reference now to FIG. 19, there is illustrated a high level logicalflowchart of an exemplary method of servicing a processor updateoperation in a data processing system implementing coherency domains inaccordance with preferred embodiments of the present invention. In suchembodiments, the process given in FIG. 19 is implemented in lieu of theprocess depicted in FIG. 6 and described above.

The process begins at block 1900 in response to receipt by an L2 cache230 of an update request by an associated one of the processor cores 200within the same processing unit 104. In response to the receipt of theupdate request, master 232 of the L2 cache 230 accesses its L2 cachedirectory 302 to determine if the memory block referenced by the requestaddress specified by the update request is cached within L2 cache 230 inM state, as shown at block 1902. If so, the master 232 updates thememory block in L2 cache 232 within the new data supplied by theprocessor core 200, as illustrated at block 1904. Thereafter, the updateprocess ends at block 1906.

As shown at blocks 1910-1912, if L2 cache directory 302 insteadindicates that L2 cache 230 holds the specified memory block in the Mestate, master 232 updates the state field 306 for the requested memoryblock to M state in addition to updating the memory block as shown atblock 1904. Thereafter, the process terminates at block 1906.

As depicted at block 1920, if L2 cache directory 302 indicates that L2cache 230 holds the requested memory block in either of the T or Testates, meaning that the L2 cache 230 is the HPC for the requestedmemory block and the requested memory block may possibly be held in oneor more other L2 caches 230, master 232 must gain exclusive access tothe requested memory block in order to perform the requested update tothe memory block. The process by which master 232 gains exclusive accessto the requested memory block is shown at blocks 1922-1928.

According to this process, master 232 updates the state of the requestedmemory block in the associated state field 306 of L2 cache directory 302to the M state, as depicted at block 1922. This upgrade is cache stateis permissible without first informing other L2 caches 230 because, asthe HPC, the L2 cache 230 has the authority to award itself exclusiveaccess to the requested memory block. As illustrated at block 1924, thesnooper 236 of the L2 cache 230 provides “downgrade” partial responsesto any competing DClaim operations snooped on its local interconnect 114by which other masters are seeking ownership of the requested memoryblock. These partial responses indicate that the other requestors mustreissue any such competing operations as bus RWITM operations. Inaddition, as depicted at block 1926, master 232 issues a bus killoperation on interconnects 110, 114 to invalidate any other cachedcopies of the memory block, as described above with reference to FIG.14. Master 232 next determines at block 1928 whether or not the CR forthe bus kill operation indicates that the bus kill operationsuccessfully invalidated all other cached copies of the requested memoryblock or whether additional “cleanup” (i.e., invalidation of othercached copies) is required. If the CR indicates that additional cleanupis not required, the process proceeds to block 1904, which has beendescribed. If the CR indicates that additional cleanup is required, theprocess returns to block 1924, which has been described.

Referring now to block 1930, if the access to L2 cache directory 302indicates that the requested memory block is held in the Sr or S states,L2 cache 230 is not the HPC for the requested memory block, and master232 must gain ownership of the requested memory block from the HPC, ifany, or in the absence of an HPC, the LPC, prior to updating the memoryblock.

Accordingly, master 232 first determines at block 1931 whether to issuea bus DClaim operation as a local or global operation, as describedabove with reference to block 1810 of FIG. 18. If master 232 makes adetermination to issue a global bus DClaim operation, the processproceeds to block 1940, which is described below. In response to adetermination at block 1931 to issue a bus DClaim operation as a localoperation, master 232 issues a local bus DClaim operation at block 1932,as described below in greater detail with reference to FIG. 26. Master232 then awaits receipt of the CR of the local bus DClaim operation,which is represented by the collection of decision blocks 1934, 1936 and1938. If the CR indicates “retry” (block 1934), the process returns toblock 1931, which has been described. If the CR alternatively indicatesdefinitively that the bus DClaim operation cannot be serviced with thelocal coherency domain (block 1936), the process proceeds to block 1940,which is described below. If the CR alternatively indicates “downgrade”,meaning that another requestor has obtained ownership of the requestedmemory block via a bus DClaim operation, the process passes to block1948, which is described below. If the CR alternatively indicates thatmaster 232 has been awarded ownership of the requested memory block bythe HPC based upon the local bus DClaim operation, the process passesthrough page connector A to block 1924 and following blocks, which havebeen described.

Block 1940 depicts master 232 issuing a global bus DClaim operation, asdescribed above with respect to FIG. 13. Master 232 next determines atblocks 1942-1944 whether or not the CR for the global bus DClaimoperation indicates that it succeeded, should be retried, or was“downgraded” to a RWITM operation. If the CR indicates that the busDClaim operation should be retried (block 1942), master 232 reissues aglobal bus DClaim operation at block 1940 and continues to do so until aCR other than “retry” is received. If the CR is received indicating thatthe global bus DClaim operation has been downgraded (block 1944) inresponse to another requester successfully issuing a bus DClaimoperation targeting the requested memory block, the process proceeds toblock 1946, which is described below. If the CR alternatively indicatesthat master 232 has been awarded ownership of the requested memory blockby the HPC based upon the global bus DClaim operation, the processpasses to block 1928 and following blocks, which have been described.

Block 1946 depicts master 232 of the requesting L2 cache 230 determiningwhether or not to issue a bus RWITM operation as a local or globaloperation. If master 232 elects to issue a global RWITM operation, theprocess passes to block 1954, which is described below. If, however,master 232 elects to issue a local bus RWITM operation, the processproceeds to block 1948, which illustrates master 232 issuing a local busRWITM operation and awaiting the associated CR. As indicated at block1950, if the CR indicates “retry”, the process returns to block 1946,which represents master 232 again determining whether to issue a localor global RWITM operation utilizing the additional information, if any,provided in the retry CR. If the CR to the local bus RWITM operationissued at block 1948 does not indicate “retry” (block 1950) but insteadindicates that the bus RWITM operation was successful in obtainingownership of the requested memory block (as indicated by a negativedetermination at block 1952), the process passes to block 1928, whichhas been described. If master 232 determines at block 1952 that the CRto the local bus RWITM operation indicates that the operation cannot beserviced within the local coherency domain, the process passes to block1954 and following blocks.

Blocks 1954 and 1956 depict master 232 iteratively issuing a global busRWITM operation for the requested memory block, as described above withreference to FIG. 12B, until a CR other than “retry” is received. Inresponse to master 232 receiving a non-retry CR indicating that itsucceeded in obtaining ownership of the requested memory block (block1956), the process passes to block 1928 and following blocks, which havebeen described.

With reference now to block 1960, if a negative determination is made atblocks 1902, 1910, 1920 and 1930, L2 cache 230 does not hold a validcopy of the requested memory block. Accordingly, as indicated at blocks1960 and 1970, L2 cache 230 performs a cache castout operation if neededto allocate a cache line for the requested memory block. Thereafter, theprocess passes to block 1946 and following blocks, which are describedabove.

Referring now to FIG. 20, there is depicted a high level logicalflowchart of an exemplary method of servicing a processor writeoperation in a data processing system implementing coherency domains inaccordance with preferred embodiments of the present invention. In suchembodiments, the process given in FIG. 20 is implemented in lieu of theprocess depicted in FIG. 7 and described above.

The process begins at block 2000 in response to receipt by an L2 cache230 of a write request by an associated one of the processor cores 200within the same processing unit 104. In response to the receipt of thewrite request, master 232 of the L2 cache 230 accesses its L2 cachedirectory 302 to determine if the memory block referenced by the requestaddress specified by the update request is cached within L2 cache 230 inM state, as shown at block 2002. If so, the master 232 writes the datasupplied by the processor core 200 into L2 cache array 300, asillustrated at block 2004. Thereafter, the process ends at block 2006.

As shown at blocks 2010-2012, if L2 cache directory 302 insteadindicates that L2 cache 230 holds the specified memory block in the Mestate, master 232 updates the state field 306 for the requested memoryblock to M state in addition to writing the memory block as shown atblock 2004. Thereafter, the process terminates at block 2006.

As depicted at block 2020, if L2 cache directory 302 indicates that L2cache 230 holds the requested memory block in either of the T or Testates, meaning that the L2 cache 230 is the HPC for the requestedmemory block and the requested memory block may possibly be held in oneor more other L2 caches 230, master 232 must gain exclusive access tothe requested memory block in order to perform the requested write tothe memory block. The process by which master 232 gains exclusive accessto the requested memory block is shown at blocks 2022-2028.

According to this process, master 232 updates the state of the requestedmemory block in the associated state field 306 of L2 cache directory 302to the M state, as depicted at block 2022. As illustrated at block 2024,the snooper 236 of the requesting L2 cache 230 provides partialresponses to competing DClaim operations snooped on its localinterconnect 114 to force other requesters for the memory block toreissue any such competing requests as bus RWITM operations. Inaddition, as depicted at block 2026, master 232 issues a bus killoperation to invalidate any other cached copies of the memory block, asdescribed in detail above with reference to FIG. 14. Master 232 nextdetermines at block 2028 whether or not the CR for the bus killoperation indicates that the bus kill operation successfully invalidatedall other cached copies of the requested memory block or whetheradditional “cleanup” (i.e., invalidation of other cached copies) isrequired. If the CR indicates that additional cleanup is not required,the process proceeds to block 2004, which has been described. If the CRindicates that additional cleanup is required, the process returns toblock 2024, which has been described.

Referring now to block 2030, if the access to L2 cache directory 302indicates that the requested memory block is held in the Sr or S states,L2 cache 230 is not the HPC for the requested memory block, and master232 must gain ownership of the requested memory block from the HPC, ifany, or in the absence of an HPC, the LPC, prior to writing the memoryblock. Accordingly, master 232 first determines at block 2050 whether toissue a bus DBCZ operation as a local or global operation.

If master 232 elects to issue a global bus DCBZ operation, the processpasses to block 2060, which is described below. If, however, master 232elects to issue a local bus DCBZ operation, the process proceeds toblock 2052, which illustrates master 232 issuing a local bus DCBZoperation, as described below with reference to FIG. 27, and thenawaiting the associated CR. As indicated at block 2054, if the CRindicates “retry”, the process returns to block 2050, which representsmaster 232 again determining whether to issue a local or global bus DCBZoperation utilizing the additional information, if any, provided in the“retry” CR. If the CR to the local bus DCBZ operation issued at block2052 does not indicate “retry” (block 2054) but instead indicates thatthe bus RWITM operation was successful in obtaining ownership of therequested memory block (block 2056), the process passes to block 2028,which has been described. If master 232 determines at block 2056 thatthe CR to the local bus DCBZ operation indicates that the operationcannot be serviced within the local coherency domain, the process passesto block 2060 and following blocks.

Block 2060 illustrates the requesting master 232 issuing a global busDCBZ operation, as described above with respect to FIG. 15. As shown atblock 2062, master 232 reissues the global bus DCBZ operation at block2060 until a CR other than “retry” is received. Following receipt of aCR to the global bus DCBZ operation other than “retry” at block 2062,the process passes to block 2028 and following blocks, which have beendescribed.

With reference now to block 2040, if a negative determination is made atblocks 2002, 2010, 2020 and 2030, L2 cache 230 does not hold a validcopy of the requested memory block. Accordingly, as indicated at block2040 and 2042, L2 cache 230 performs a cache castout operation if neededto allocate a cache line for the requested memory block. Thereafter, theprocess passes to block 2050 and following blocks, which have beendescribed.

Referring now to FIG. 21, there is illustrated a high level logicalflowchart of an exemplary method of performing an I/O read operation ina data processing system implementing coherency domains in accordancewith preferred embodiments of the present invention. In suchembodiments, the process given in FIG. 21 is implemented in lieu of theprocess depicted in FIG. 8 and described above.

As shown, the process begins at block 2100 in response to receipt by theI/O controller 214 of a processing unit 104 of an I/O read request by anattached I/O device 216. In response to receipt of the I/O read request,I/O controller 214 determines at block 2102 whether or not to issue aglobal or local bus read operation to obtain the requested memory block.

If the I/O controller 214 elects to issue a global bus read operation,the process passes to block 2104, which is described below. If, however,I/O controller 214 elects to issue a local bus read operation, theprocess proceeds to block 2120, which illustrates I/O controller 214issuing a local bus read operation, as described below with reference toFIG. 24, and then awaiting the associated CR. As indicated at block2122, if the CR indicates “success”, I/O controller 214 receives therequested memory block and then routes the requested memory block to I/Odevice 216, as shown at block 2108. Thereafter, the process ends atblock 2110.

Returning to block 2122, if the CR for the local bus read operationissued at block 2120 does not indicate “success”, the process passes toblock 2124, which depicts I/O controller 214 determining whether the CRdefinitively indicates that a bus read operation cannot be servicedwithin the local coherency domain. If not, the process returns to block2102, which represents I/O controller 214 again determining whether toissue a local or global bus read operation utilizing the additionalinformation, if any, provided in the CR. In response to I/O controller214 electing at block 2102 to issue a global bus read operation or inresponse to I/O controller 214 determining at block 2124 that the CR tothe local bus read operation definitively indicates that the bus readoperation cannot be serviced within the local coherency domain, theprocess passes to block 2104 and following blocks.

Block 2104 depicts I/O controller 214 issuing a global bus readoperation on system interconnect 110 via local interconnect 114, asdescribed above with reference to FIG. 11B. As indicated at block 2106,I/O controller 214 continues to issue the bus read operation until a CRis received indicating “success”. Once the global bus read operationsucceeds and the requested memory block is received, I/O controller 214routes the data received in response to the global bus read operation tothe requesting I/O device 216, as illustrated at block 2108. The processthereafter terminates at block 2110.

With reference now to FIG. 22, there is depicted a high level logicalflowchart of an exemplary method of performing an I/O write operation ina data processing system implementing coherency domains in accordancewith preferred embodiments of the present invention. In suchembodiments, the process given in FIG. 22 is performed in lieu of thatillustrated in FIG. 9A.

As shown, the process begins at block 2200 in response to receipt by theI/O controller 214 of a processing unit 104 of an I/O write request byan attached I/O device 216. In response to receipt of the I/O writerequest, I/O controller 214 determines at block 2202 whether or not toissue a global or local bus write operation to obtain the requestedmemory block.

If I/O controller 214 elects to issue a global bus write operation, theprocess passes to block 2220, which is described below. If, however, I/Ocontroller 214 elects to issue a local bus write operation, the processproceeds to block 2204, which illustrates I/O controller 214 issuing alocal bus write operation, as described below with reference to FIG. 29,and then awaiting the associated CR. As indicated at block 2206, if theCR indicates “retry local”, meaning that the local bus write operationcan definitely be serviced within the local coherency domain if retried,I/O controller 214 reissues the local bus write operation at block 2204.If I/O controller 214 receives a CR providing more equivocalinformation, for example, simply “retry” (block 2208), the processreturns block 2202, which has been described. Alternatively, if I/Ocontroller 214 receives a CR indicating definitively that the bus writeoperation cannot be serviced within the local coherency domain (block2210), the process proceeds to block 2220, which is described below.Finally, if I/O controller 214 receives a CR indicating that it has beenawarded ownership of the requested memory block, the process passes fromblock 2204 through blocks 2206, 2208 and 2210 to block 2224 andfollowing blocks, which illustrate I/O controller 214 performing cleanupoperations, as described below.

Referring now to block 2220, I/O controller 214 issues a global buswrite operation, as described above with reference to FIG. 17A. Asindicated at block 2222, I/O controller 214 continues to issue theglobal bus write operation until a CR other than “retry” is received. Ifthe CR for the global bus write operation issued at block 2220 indicatesthat no other snooper holds a valid copy of the requested memory block(block 2224), the process ends at block 2226. If, however, I/Ocontroller 214 determines at block 2224 that the CR indicates that atleast one stale cached copy of the requested memory block may remain,I/O controller 214 performs “cleanup” by downgrading any conflictingDClaim operations it snoops, as shown at block 2230, and issuing buskill operations, as depicted at block 2232, until a CR is received atblock 2224 indicating that no stale cached copies of the requestedmemory block remain in data processing system 100. Once cleanupoperations are complete, the process ends at block 2226.

Referring now to FIG. 23, there is illustrated a high level logicalflowchart of an exemplary method of performing a cache castout operationin a data processing system implementing coherency domains in accordancewith preferred embodiments of the present invention. In suchembodiments, the process given in FIG. 23 is performed in lieu of thatillustrated in FIG. 10.

The illustrated process begins at block 2300 when an L2 cache 230determines that a castout of a cache line is needed, for example, atblock 1804 of FIG. 18, block 1970 of FIG. 19 or block 2042 of FIG. 20.To perform the castout operation, the L2 cache 230 first determines atblock 2301 whether or not to issue a global or local bus castoutoperation for the selected memory block.

If L2 cache 230 elects to issue a global bus castout operation, theprocess passes to block 2302, which is described below. If, however, L2cache 230 elects to issue a local bus castout operation, the processproceeds to block 2303, which illustrates L2 cache 230 issuing a localbus castout operation, as described below with reference to FIG. 28, andthen awaiting the associated CR. As indicated at block 2308, if the CRindicates “retry local”, meaning that the local bus write operation candefinitely be serviced within the local coherency domain if retried, L2cache 230 reissues the local bus castout operation at block 2303.Alternatively, if L2 cache 230 receives a CR indicating definitivelythat the bus write operation cannot be serviced within the localcoherency domain (block 2310), the process proceeds to block 2302, whichis described below. Finally, if L2 cache 230 receives a CR indicatingthat the castout of the selected memory block succeeded, the processsimply ends at block 2306.

Block 2302 depicts L2 cache 230 issuing a global bus castout operationon system interconnect 110 via local interconnect 114, as describedabove with respect to FIG. 16. As indicated at block 2304, the L2 cache230 reissues the global bus castout operation until a CR other than“retry” is received. Thereafter, the process ends at block 2306.

B. Interconnect Operations with Coherency Domains

With reference now to FIG. 24, there is depicted a high level logicalflowchart of an exemplary method of performing a local bus readoperation in a data processing system implementing coherency domains inaccordance with preferred embodiments of the present invention. Asshown, the process begins at block 2400, for example, at block 1812 ofFIG. 18, with the issuance of a local bus read operation on localinterconnect 114. As described above, the operations performed by thevarious snoopers 122, 236 in response to the local bus read operationdepend upon the partial responses and CR for the bus read operation. Thevarious partial responses that snoopers 122, 236 may provide todistributed response logic 210 are represented in FIG. 24 by theoutcomes of decision blocks 2402, 2410, 2412, 2414, 2420, and 2442.These partial responses in turn determine the CR for the local bus readoperation.

If a snooper 236 affirms the bus read operation with a partial responseindicating that the L2 cache 230 containing the snooper 236 holds therequested memory block in either the M or Me state as shown at block2402, the process proceeds from block 2402 to block 2404. Block 2404indicates the operations of the master in the requesting L2 cache 230and the affirming L2 cache 230 in response to the request. Inparticular, the snooper 236 in the affirming L2 cache 230 updates thecache state of the requested memory block from M to T or from Me to Teand may initiate transmission of the requested memory block to therequesting L2 cache 230 prior to receipt of the CR (i.e., provides“early” data). In response to receipt of the requested memory block, themaster 232 in the requesting L2 cache 230 updates the cache state of therequested memory block to the Sr state. The process ends withdistributed response logic 210 generating a CR indicating success, asdepicted at block 2408.

If a snooper 236 affirms the bus read operation with a partial responseindicating that the L2 cache 230 containing the snooper 236 holds therequested memory block in either the T or Te state as shown at block2410 and an Sr′ snoop response is also given affirming the local busread operation as shown at block 2412, the process passes to block 2418.Block 2418 represents the Sr′ snooper 236 updating the cache state ofits copy of the requested memory block to S and initiating transmissionof the requested memory block to the requesting L2 cache 230 prior toreceipt of the CR (i.e., provides “early” data). In response to receiptof the requested memory block, the master 232 in the requesting L2 cache230 updates the cache state of the requested memory block to the Srstate. The cache state of the T or Te snooper affirming the local busread operation remains unchanged. The process then ends with distributedresponse logic 210 generating a CR indicating “success”, as depicted atblock 2408.

If the complex of partial responses include a T or Te snooper 236affirming the bus read operation, no snooper 236 affirming the bus readoperation with an Sr′ snoop response, and a snooper 236 providing apartial response (e.g., a type of retry) that may indicate that an Sr′snooper 236 is possibly hidden, the process passes to block 2416. Block2416 represents the T or Te snooper 236 that affirmed the bus readoperation initiating transmission of the requested memory block to therequesting L2 cache 230 after receipt of the CR (i.e., provides “late”data) and retaining the requested memory block in the T or Te state. Inresponse to receipt of the requested memory block, the master 232 in therequesting L2 cache 230 holds the requested memory block in the S state(since an Sr snooper 236 may be hidden and only one Sr snooper 236 ispermitted in the data delivery domain for the requested memory block).The process then ends with distributed response logic 210 generating aCR indicating success, as depicted at block 2408.

If the complex of partial responses includes a T or Te snooper 236affirming the bus read operation, no Sr′ snooper 236 affirming the localbus read operation, and no snooper 236 providing a partial responseindicating a possibly hidden Sr′ snooper 236, the process passes toblock 2406. Block 2406 represents the T or Te snooper 236 that affirmedthe bus read operation initiating transmission of the requested memoryblock to the requesting L2 cache 230 after receipt of the CR (i.e.,provides “late” data) and retaining the requested memory block in the Tor Te state. In response to receipt of the requested memory block, themaster 232 in the requesting L2 cache 230 holds the requested memoryblock in the Sr state (since no other Sr snooper 236 exists in the datadelivery domain for the requested memory block). The process then endswith distributed response logic 210 generating a CR indicating success,as depicted at block 2408.

Referring now to block 2420, if no M, Me, T or Te snooper 236 affirmsthe bus read operation, but a snooper 236 affirms the local bus readoperation with an Sr′ partial response, the local bus read operation isserviced in accordance with block 2422. In particular, the Sr′ snooper236 initiates transmission of the requested memory block to therequesting L2 cache 230 prior to receipt of CR and updates the state ofthe requested memory block in its L2 cache directory 302 to the S state.The master 232 in the requesting L2 cache 230 holds the requested memoryblock in the Sr state. The process then ends with distributed responselogic 210 generating a CR indicating success, as depicted at block 2408.

Turning now to block 2442, if no M, Me, T, Te or Sr′ snooper 236 affirmsthe local bus read operation or is possibly hidden, response logic 210generates a “go global” CR (block 2444) indicating to the master 232that the bus read operation should be reissued as a global bus readoperation. If, on the other hand, no M, Me, T, Te or Sr′ snooper 236affirms the bus read operation and a snooper 236 provides a partialresponse indicating that it cannot affirm the bus read operation but mayhold the requested memory block in one of the M, Me, Sr, T or Te cachestate, response logic 210 generates a CR indicating “retry”, as depictedat block 2450. In response to the “retry” CR, the master 232 may reissuethe bus read operation as either a local or global bus read operation,as explained above with reference to block 1810.

Referring now to FIG. 25, there is illustrated a high level logicalflowchart of an exemplary method of performing a local bus RWITMoperation in a data processing system implementing coherency domains inaccordance with preferred embodiments of the present invention. Theprocess begins at block 2500 with a master 232 issuing a local bus RWITMoperation on the local interconnect 114 of a coherency domain, forexample, at block 1948 of FIG. 19. The operations performed by thevarious snoopers 122, 236 in response to the local bus RWITM operationdepend upon the partial responses and CR for the local bus RWITMoperation. The various partial responses that snoopers 122, 236 mayprovide to distributed response logic 210 are represented in FIG. 25 bythe outcomes of decision blocks 2502, 2510, 2512, 2532, 2534 and 2550.These partial responses in turn determine the CR for the local bus RWITMoperation.

If a snooper 236 affirms the local bus RWITM operation with a partialresponse indicating that the L2 cache 230 containing the snooper 236holds the requested memory block in either the M or Me state as shown atblock 2502, the process proceeds from block 2502 to block 2504. Block2504 indicates the operations of the requesting L2 cache 230 and theaffirming L2 cache 230 in response to the request. In particular, thesnooper 236 in the affirming L2 cache 230 updates the cache state of therequested memory block to the I state and may initiate transmission ofthe requested memory block to the requesting L2 cache 230 prior toreceipt of the CR (i.e., provides “early” data). In response to receiptof the requested memory block, the master 232 in the requesting L2 cache230 holds the requested memory block in the M state. The process thenends with distributed response logic 210 generating a CR indicatingsuccess, as depicted at block 2506.

If a snooper 236 affirms the bus RWITM operation with a partial responseindicating that the L2 cache 230 containing the snooper 236 holds therequested memory block in either the T or Te state as shown at block2510 and no snooper 236 affirms the bus RWITM operation with a Sr′partial response as shown at block 2512, the process passes to block2514. Block 2514 represents the T or Te snooper 236 that affirmed thebus RWITM request initiating transmission of the requested memory blockto the requesting L2 cache 230 in response to receipt of the CR (i.e.,provides “late” data). In response to receipt of the requested memoryblock, the master 232 in the requesting L2 cache 230 holds the cachestate of the requested memory block in the M state. All affirmingsnoopers 236 update their respective cache states for the requestedmemory block to I. As shown at block 2516, the CR generated bydistributed response logic 210 indicates “cleanup”, meaning that themaster 232 may have to issue one or more bus kill operations toinvalidate other copies of the requested memory block, if any, residingoutside of the local coherency domain, as described above with referenceto blocks 1926, 1928 and 1924 of FIG. 19.

If the complex of partial responses includes a T or Te snooper 236 andSr′ snooper 236 both affirming the local bus RWITM operation, theprocess passes to block 2515. Block 2515 represents the Sr′ snooper 236that affirmed the bus RWITM request initiating transmission of therequested memory block to the requesting L2 cache 230 prior to receiptof the CR (i.e., providing “early” data). In response to receipt of therequested memory block, the master 232 in the requesting L2 cache 230holds the cache state of the requested memory block in the M state. Allaffirming snoopers 236 update their respective cache states for therequested memory block to I. The CR generated by distributed responselogic 210 indicates “cleanup”, as shown at block 2516.

Turning now to block 2532, if no M, Me, T, or Te snooper 236 affirms thelocal bus RWITM operation, and further, no M, Me, T, or Te snooper 236provides a partial response indicating that it may be possibly hidden(block 2532), all affirming snoopers 236 invalidate the requested memoryblock in their respective L2 cache directories 302 (block 2538). Inaddition, data provided by an Sr′ snooper 236 affirming the local busRWITM operation, if any, is discarded by the master 232 (blocks 2534 and2536) in response to receipt of the CR. Response logic 210 generates aCR indicating “go global”, as depicted at block 2540, because no HPC forthe requested memory block can be found in the local coherency domain.

Affirming snoopers 236 also invalidate their respective copies of therequested memory block at block 2544 and response logic 210 generates a“retry” CR at block 2556 if no M, Me, T or Te snooper 236 affirms thelocal bus RWITM operation (blocks 2502 and 2510) but a snooper 236provides a partial response indicating that it may hold the requestedmemory block in one of the M, Me, T, or Te states but cannot affirm thelocal bus RWITM operation (block 2532). As shown at block 2550, if thecomplex of partial responses further includes an Sr′ snooper 236affirming the local bus RWITM operation and thus providing early data,the “retry” CR provided by response logic 210 further instructs therequesting L2 cache 230 to discard the copy of the requested memoryblock provided by the Sr′ snooper 236, as shown at block 2552. The copyof the requested memory block is discarded as no HPC is available tomediate the transfer of HPC status to the requesting master 232.

With reference now to FIG. 26, there is illustrated a high level logicalflowchart of an exemplary method of performing a local bus DClaimoperation in a data processing system implementing coherency domains inaccordance with preferred embodiments of the present invention. Theprocess begins at block 2600, for example, with a master 232 issuing alocal bus DClaim operation on a local interconnect 114 at block 1932 ofFIG. 19. The various partial responses that snoopers 236 may provide todistributed response logic 210 in response to the local bus DClaimoperation are represented in FIG. 26 by the outcomes of decision blocks2602, 2610, and 2620. These partial responses in turn determine what CRresponse logic 210 generates for the local bus DClaim operation.

As shown at block 2602, if any snooper 236 issues a partial responsedowngrading the local bus DClaim operation to a bus RWITM operation asillustrated, for example, at block 1938 of FIG. 19, each affirmingsnooper 236 other than the downgrading snooper 236 invalidates itsrespective copy of the requested memory block, if any (block 2603), anddistributed response logic 210 generates a CR indicating “downgrade”, asshown at block 2604. In response to this CR, the master 232 of the localbus DClaim operation next attempts to gain ownership of the requestedmemory block utilizing a local bus RWITM operation, as depicted at block1948 of FIG. 19.

If a snooper 236 affirms the local bus DClaim operation with a partialresponse indicating that the L2 cache 230 containing the snooper 236holds the requested memory block in either the T or Te state as shown atblock 2610, the process passes to block 2612. Because no data transferis required in response to a bus DClaim operation, block 2612 indicatesthat the master 232 in the requesting L2 cache 230 updates the cachestate of the requested memory block in L2 cache directory 302 to the Mstate. All affirming snoopers 236 update their respective cache statesfor the requested memory block to I. As shown at block 2618, distributedresponse logic 210 generates a CR indicating “cleanup”, meaning that therequesting L2 cache 230 must issue one or more bus kill operations toinvalidate copies of the requested memory block, if any, held outside ofthe local coherency domain.

Turning now to block 2620, if no snooper downgrades the local bus DClaimoperation (block 2602), no T or Te snooper 236 affirms the local busDClaim operation (block 2610), and further, and a snooper 236 provides apartial response indicating that it may hold the requested memory blockin the T or Te state but cannot affirm the local bus DClaim operation,the process passes to blocks 2621 and 2622. These blocks illustrate eachaffirming snooper 236 invalidating its respective copy of the requestedmemory block, if any (block 2621), and response logic 210 generating aCR indicating “retry” (block 2622). In response to the “retry” CR, therequesting master 232 may reissue the bus DClaim operation as either alocal or global operation, as explained above with reference to block1931 of FIG. 19. If, however, no snooper downgrades the local bus DClaimoperation (block 2602), no T or Te snooper 236 affirms the bus DClaimoperation or is possibly hidden (blocks 2602, 2610, 2620), responselogic 210 provides a “go global” CR, as shown at block 2632, and allaffirming snoopers, if any, having a valid copy of the requested memoryblock invalidate their respective copies of the requested memory block,as shown at block 2630. In response to the “go global” CR, the master232 reissues the bus DClaim operation as a global operation, as depictedat block 1940 of FIG. 19.

Referring now to FIG. 27, there is depicted a high level logicalflowchart of an exemplary method of performing a local bus DCBZoperation in a data processing system implementing coherency domains inaccordance with preferred embodiments of the present invention. Theprocess begins at block 2700, for example, with the issuance of a localbus DCBZ operation on a local interconnect 114 at block 2052 of FIG. 20.The various partial responses that snoopers 236 may provide todistributed response logic 210 are represented in FIG. 27 by theoutcomes of decision blocks 2702, 2710, and 2720. These partialresponses in turn determine the CR for the local bus DCBZ operation.

If a snooper 236 affirms the local bus DCBZ operation with a partialresponse indicating that the L2 cache 230 containing the snooper 236holds the requested memory block in either the M or Me state as shown atblock 2702, the process proceeds to block 2704. Block 2704 indicates theoperations of the requesting L2 cache 230 and affirming L2 cache 230 inresponse to the request. In particular, the master 232 in the requestingL2 cache 230 updates the cache state of the requested memory block tothe M state (no data is transferred), and the snooper 236 in theaffirming L2 cache 230 updates the cache state of the requested memoryblock to the I state. The process then ends with distributed responselogic 210 generating a CR indicating “success”, as depicted at block2706.

If, on the other hand, a snooper 236 affirms the local bus DCBZoperation with a partial response indicating that the L2 cache 230containing the snooper 236 holds the requested memory block in eitherthe T or Te state as shown at block 2710, the process passes to block2712. Block 2712 represents the T or Te snooper 236 (and any other validaffirming snooper) invalidating its copy of the requested memory blockand the master 232 in the requesting L2 cache 230 updating the cachestate of the requested memory block to the M state. As furtherillustrated at block 2716, distributed response logic 210 generates a CRindicating “cleanup” in order to ensure the invalidation of copies ofthe requested memory block, if any, held in L2 caches 230 outside of thelocal coherency domain.

Turning now to block 2720, if no M, Me, T or Te snooper 236 affirms thelocal bus DCBZ operation (blocks 2702 and 2710), and further, a snooper236 provides a partial response indicating that it may hold therequested memory block in the M, Me, T or Te state but cannot affirm thelocal bus DCBZ operation, each affirming snooper 236 invalidates itsrespective copy of the requested memory block, if any (block 2721), andresponse logic 210 generates a CR indicating “retry”, as depicted atblock 2722. In response to the “retry” CR, the requesting master 232 mayreissue the bus DCBZ operation as either a local or global operation, asexplained above with reference to block 2050 of FIG. 20. If, however, noM, Me, T or Te snooper 236 affirms the bus DClaim operation or ispossibly hidden (blocks 2702, 2710, 2720), response logic 210 provides a“go global” CR, as shown at block 2732, and all affirming snoopers, ifany, having a valid copy of the requested memory block invalidate theirrespective copies of the requested memory block, as shown at block 2730.In response to the “go global” CR, the master 232 reissues the bus DCBZoperation as a global operation, as depicted at block 2060 of FIG. 20.

With reference now to FIG. 28, there is illustrated a high level logicalflowchart of an exemplary method of performing a local bus castoutoperation in a data processing system implementing coherency domains inaccordance with preferred embodiments of the present invention. Theprocess begins at block 2800, for example, with the issuance of a localbus castout operation on a local interconnect 114 at block 2303 of FIG.23. The various partial responses that snoopers 122, 236 may provide todistributed response logic 210 are represented in FIG. 28 by theoutcomes of decision blocks 2802, 2810 and 2820. These partial responsesin turn determine the CR for the local bus castout operation.

If a snooper 236 affirms the bus castout operation with a partialresponse indicating that the L2 cache 230 containing the snooper 236holds the requested memory block in any of the M, Me, T or Te states asshown at block 2802, an error halting processing occurs, as indicated atblock 2804, because the memory block being castout can have only one HPC(i.e., the requesting L2 cache 230).

As depicted at block 2810, if no M, Me, T, or Te snooper 236 affirms thebus castout operation (block 2802), and further, if no snooper 122provides a partial response indicating that it is responsible (i.e., theLPC) for the requested memory block, response logic 210 provides a “goglobal” CR, as depicted at block 2812, because the LPC is a requiredparticipant to receive the castout memory block. If, however, no M, Me,T, or Te snooper 236 affirms the bus castout operation (block 2802) anda snooper 122 provides a partial response indicating that it isresponsible (i.e., the LPC) for the requested memory block but does notaffirm the bus castout operation (blocks 2810 and 2820), response logic210 generates a CR indicating “local retry”, as depicted at block 2830,because the LPC is in the local coherency domain but must be availableto receive the castout memory block. If a memory controller snooper 122affirms the bus castout operation (block 2820) and no M, Me, T or Tesnooper 236 affirms the bus castout operation (block 2802), therequesting L2 cache 230 invalidates the memory block within its cachedirectory 302 and transmits the memory block to the LPC, as depicted atblock 2822. In addition, response logic 210 generates a CR indicating“success”, as illustrated at block 2824.

Referring now to FIG. 29, there is depicted a high level logicalflowchart of an exemplary method of performing a local bus writeoperation in a data processing system implementing coherency domains inaccordance with preferred embodiments of the present invention. Theprocess begins at block 2900, for example, with the issuance of a localbus write operation on a local interconnect 114 at block 2204 of FIG.22. The various partial responses that snoopers 122, 236 may provide todistributed response logic 210 are represented in FIG. 29 by theoutcomes of decision blocks 2902, 2910, 2912, 2920, 2922 and 2930. Thesepartial responses in turn determine the CR for the local bus writeoperation.

If no snooper 122 provides a partial response indicating that isresponsible (i.e., the LPC) for the target memory block (block 2902),each affirming snooper 236 invalidates its respective copy of the targetmemory block, as shown at block 2904, and response logic 210 provides a“go global” CR, as illustrated at block 2906, because the LPC is anecessary participant in the bus write operation. If a snooper 122provides a partial response indicating that it is responsible (i.e., theLPC) for the requested memory block but does not affirm the bus writeoperation (block 2912) and a M or Me snooper 236 affirms the local buswrite operation (block 2910), each affirming snooper 236 invalidates itsrespective copy of the requested memory block, if any (block 2924), andresponse logic 210 generates a CR indicating “retry local”, as depictedat block 2918. A “retry local” CR is generated because the LPC must beavailable to receive the target memory block. Response logic 210similarly generates a “retry” CR at block 2934 if a memory controllersnooper 122 indicates that it is the LPC for the target memory block(block 2902), no M, Me, T or Te snooper 236 affirms the local bus writeoperation (block 2910 and 2920), and a partial response indicates that aM, Me, T or Te snooper 236 may be possibly hidden (block 2930). In thiscase, each affirming snooper 236 invalidates its copy, if any, of thetarget memory block (block 2932), and response logic 210 generates a“retry” CR so that the local bus write operation only succeeds when noHPC copy of the requested memory block remains in the system.

Referring again to block 2912, assuming that an M or Me snooper 236affirms the local bus write operation and a snooper 122 affirms the buswrite operation as the LPC, the requesting L2 cache 230 transmits therequested memory block to the LPC snooper 122, and snoopers 236, if any,affirming the bus write operation invalidate their respective copies ofthe requested memory block (block 2914). The process ends withdistributed response logic 210 generating a CR indicating “success”(block 2916).

As depicted at block 2920 and following blocks, if a snooper 122provides a partial response indicating that it is the LPC for the targetmemory block (block 2902) but cannot affirm the local bus writeoperation (block 2922), no M or Me snooper 236 affirms the local buswrite operation (block 2910), and a T or Te snooper 236 affirms thelocal bus write operation, distributed response logic 210 generates a CRindicating “retry local” to force the operation to be reissued locally(block 2918), and snoopers 236 affirming the local bus write operationinvalidate their respective copies of the requested memory block (block2924). Assuming the same partial responses except for the LPC snooper122 affirming the local bus write operation (block 2922), the requestingL2 cache 230 transmits the requested memory block to the LPC snooper122, and each snooper 236 affirming the local bus write operationinvalidates its respective copy of the requested memory block (block2926). The process ends with distributed response logic 210 generating aCR indicating “cleanup” so that any other copies of the requested memoryblock that may be held outside of the local coherency domain areinvalidated (block 2928).

As has been described, the present invention supports the implementationof coherency domains within a broadcast-based SMP data processing systemthat permit the scope of broadcast of certain operations to berestricted to a local coherency domain in operating scenarios in whichthe operation can be serviced within the local coherency domain. In thismanner, the limited bandwidth on local and system interconnects isadvantageously conserved.

V. Domain Indicators

In the embodiment described above, masters 232 in L2 caches 230 have noa priori knowledge of whether an operation will succeed if issuedlocally or whether a global broadcast of the operation will ultimatelybe required. As a consequence, over time many operations will have to beissued first as local operations and then reissued as global operations.As will be appreciated, it would be desirable to limit the issuance ofunneeded local-only operations in order to reduce operational latencyand conserve additional bandwidth on local interconnects.

A. Exemplary Implementation of Domain Indicators

Accordingly, the present invention may be further enhanced through theimplementation of a domain indicator per memory block that indicateswhether or not a copy of the associated memory block is cached outsideof the local coherency domain. For example, FIG. 30 depicts a firstexemplary implementation of a domain indicator in accordance with thepresent invention. As shown in FIG. 30, a system memory 108, which maybe implemented in dynamic random access memory (DRAM), stores aplurality of memory blocks 3000. System memory 108 stores in associationwith each memory block 3000 an associated error correcting code (ECC)3002 utilized to correct errors, if any, in memory block 3000 and adomain indicator 3004. Although in some embodiments of the presentinvention, domain indicator 3004 may identify a particular coherencydomain (i.e., specify a coherency domain ID), it is hereafter assumedthat domain indicator 3004 is a 1-bit indicator that is set (e.g., to‘1’ to indicate “local”) if the associated memory block 3000 is cached,if at all, only within the same coherency domain as the memorycontroller 106 serving as the LPC for the memory block 3000. Domainindicator 3004 is reset (e.g., to ‘0’ to indicate “global”) otherwise.The setting of domain indicators 3004 to indicate “local” may beimplemented imprecisely in that a false setting of “global” will notinduce any coherency errors, but may cause unneeded global broadcasts ofoperations.

Importantly, a memory controller 106 that sources a memory block inresponse to an operation preferably transmits the associated domainindicator 3004 in conjunction with the requested memory block.

B. Interconnect Operations with Coherency Domains and Domain Indicators

With the exemplary implementation of domain indicators 3004, the CPU andcache operations described above with reference to FIGS. 18-23 and 9 band the local bus DClaim operation, local Bus DCBZ operation, and globalbus kill operation described above with reference to FIGS. 26, 27 and14, respectively, remain essentially unchanged. Modifications arepreferably made, however, in the replacement of victim memory blocks.First, cache castout operations, such as that illustrated at blocks1806, 1970, 2042 of FIGS. 18-20, respectively, are preferably performednot only for victim memory blocks in the M and T coherency states asdescribed above, but also for victim memory blocks in the Te coherencystate. Despite being consistent with the system memory image, Te memoryblocks are preferably replaced via cache castout operations rather thansimple L2 cache directory updates because of a second enhancement,namely, the use of castout operations to update domain indicators 3004in system memories 108 and to indicate the possible presence of sharedcopies of the memory block in one or more other coherency domains, asdescribed further below with reference to FIGS. 39-40.

The implementation of domain indicators 3004 also permits enhancement ofthe local and global bus read operations, local and global bus RWITMoperations, global bus DClaim and DCBZ operations, local and global buswrite operations, and global bus partial write operations describedbelow with reference to FIGS. 31-41. Referring now to FIG. 31, there isdepicted a high level logical flowchart of an exemplary method ofperforming a local bus read operation in a data processing systemimplementing coherency domains and domain indicators in accordance withthe present invention. The process begins at block 3100, for example, atblock 1812 of FIG. 18, with an L2 cache 230 issuing a local bus readoperation on its local interconnect 114. The various partial responsesthat snoopers 122, 236 may provide to distributed response logic 210 inresponse to snooping the local bus read operation are represented inFIG. 31 by the outcomes of decision blocks 3102, 3110, 3112, 3114, 3120,3130, 3132, 3140, 3144, 3146 and 3148. These partial responses in turndetermine the CR for the local bus read operation.

As shown at block 3102, if a snooper 236 of an L2 cache 230 affirms thelocal bus read operation with a partial response indicating that the L2cache 230 holds the requested memory block in either the M or Me state,the process proceeds from block 3102 to block 3104. Block 3104 indicatesthe operations of the requesting L2 cache 230 and the affirming L2 cache230 in response to the local bus read operation. In particular, thesnooper 236 in the affirming L2 cache 230 updates the cache state of therequested memory block from M to T or from Me to Te. In addition, thesnooper 236 in the affirming L2 cache 230 may initiate transmission ofthe requested memory block to the requesting L2 cache 230 prior toreceipt of the CR (i.e., provides “early” data). Upon receipt, themaster 232 in the requesting L2 cache 230 places the requested memoryblock in L2 cache array 300 in the Sr state. The process ends withdistributed response logic 210 generating a CR indicating “success”, asdepicted at block 3108.

If, on the other hand, a snooper 236 of an L2 cache 230 affirms thelocal bus read operation with a partial response indicating that the L2cache 230 holds the requested memory block in either the T or Te state(block 3110) and an Sr′ snooper 236 also affirms the bus read operation(block 3112), the process passes to block 3118. Block 3118 representsthe Sr′ snooper 236 updating the cache state of the requested memoryblock to S and initiating transmission of the requested memory block tothe requesting L2 cache 230 prior to receipt of the CR (i.e., provides“early” data). Upon receipt, the master 232 in the requesting L2 cache230 places the requested memory block in L2 cache array 300 in the Srstate. The T or Te snooper 236 remains unchanged. The process ends withdistributed response logic 210 generating a CR indicating “success”, asdepicted at block 3108.

If the complex of partial responses includes a T or Te snooper 236affirming the bus read operation (block 3110), no Sr′ snooper 236affirming the bus read operation (block 3112), and a snooper 236providing an partial response (e.g., a type of retry) indicating that anSr′ snooper 236 may be possibly hidden in the local data delivery domain(block 3114), the process passes to block 3116. Block 3116 representsthe T or Te snooper 236 that affirmed the bus read operation initiatingtransmission of the requested memory block to the requesting L2 cache230 after receipt of the CR (i.e., provides “late” data) and retainingthe requested memory block in the T or Te state. Upon receipt, themaster 232 in the requesting L2 cache 230 places the requested memoryblock in L2 cache directory 300 in the S state (since an Sr′ snooper 236may be hidden and only one Sr′ snooper 236 is permitted in each datadelivery domain for the requested memory block). The process ends withdistributed response logic 210 generating a CR indicating “success”, asdepicted at block 3108.

If the complex of partial responses includes a T or Te snooper 236affirming the local bus read operation (block 3110), no Sr′ snooper 236affirming the bus read operation (block 3112), and no snooper 236providing a partial response that may possibly hide a Sr′ snooper 236(block 3114), the process passes to block 3106. Block 3106 representsthe T or Te snooper 236 that affirmed the bus read operation initiatingtransmission of the requested memory block to the requesting L2 cache230 after receipt of the CR (i.e., provides “late” data) and retainingthe requested memory block in the T or Te state. Upon receipt, themaster 232 in the requesting L2 cache 230 places the requested memoryblock in L2 cache array 300 in the Sr state (since no other Sr′ snooper236 exists for the requested memory block in the local data deliverydomain). The process ends with distributed response logic 210 generatinga CR indicating “success”, as depicted at block 3108.

Referring now to block 3120, if no M, Me, T or Te snooper 236 affirmsthe local bus read operation, but an Sr′ snooper 236 affirms the localbus read operation, the local bus read operation is serviced inaccordance with block 3122. In particular, the Sr′ snooper 236 affirmingthe local bus read operation initiates transmission of the requestedmemory block to the requesting L2 cache 230 prior to receipt of CR andupdates the state of the requested memory block in its L2 cachedirectory 302 to the S state. The master 232 in the requesting L2 cache230 places the requested memory block in its L2 cache array 300 in theSr state. The process ends with distributed response logic 210generating a CR indicating “success”, as depicted at block 3108.

Turning now to block 3130, if no M, Me, T, Te or Sr′ snooper 236 affirmsthe local bus read operation, and further, if no snooper 122 provides apartial response indicating that it is responsible (i.e., the LPC) forthe requested memory block, response logic 210 generates one of two CRsdepending upon whether an HPC or data source for the requested memoryblock may possibly reside in the local domain, but is possibly hidden.In particular, if an M, Me, T, Te or Sr′ snooper 236 is possibly hidden(block 3132), response logic 210 provides a “retry” CR, as shown atblock 3142. If, on the other hand, no M, Me, T, Te or Sr′ snooper 236 ispossibly hidden, the bus read operation cannot be serviced in the localdomain, and response logic 210 accordingly provides a “go global” CR atblock 3164, instructing the master 232 to reissue the bus read operationas a global bus read operation.

Referring now to block 3140, if a snooper 122 provides a partialresponse indicating that it is responsible (i.e., the LPC) for therequested memory block but does not affirm the local bus read operation,response logic 210 generates a CR indicating “retry”, as depicted atblock 3142. As indicated by decision block 3144, response logic 210similarly generates a “retry” CR at block 3142 if a memory controllersnooper 122 affirms the bus read operation and an L2 cache snooper 236provides a partial response indicating that it may hold the requestedmemory block in one of the M, Me, T, or Te states but cannot affirm thelocal bus read operation. In each of these cases, response logic 210generates a “retry” CR because the bus read operation, if reissued as alocal operation, may be able to be serviced without resorting to aglobal broadcast.

With reference now to block 3146, if no M, Me, T, Te or Sr′ snooper 236affirms the bus read operation, no M, Me, T, Te snooper 236 is possiblyhidden, and a memory controller snooper 122 affirms the local bus readoperation, the snooper 122 affirming the local bus read operationprovides the requested memory block 3000 and the associated domainindicator 3004 to the requesting L2 cache 230 in response to the CR, asdepicted at each of blocks 3150, 3152 and 3154. As shown at blocks 3150,3152, 3154 and 3160, the master 232 of the requesting L2 cache 230handles the requested memory block in accordance with the CR and thestate of the domain indicator 3004, which may arrive after the CRtogether with the requested memory block. In particular, if master 232determines at block 3160 that the domain indicator 3004 is reset to“global”, meaning that a modified copy of the requested memory block maybe cached outside the local domain, master 232 of the requesting L2cache 230 discards the requested memory block, remaining in the I statewith respect to the requested memory block (block 3162). In addition, inlight of the “global” domain indicator 3004, master 232 interprets theCR as indicating “go global” (block 3164), meaning that master 232 willreissue the bus read operation as a global bus read operation.

If, on the other hand, the domain indicator 3004 is set to indicate“local” (block 3160), the master 232 of the requesting cache 230interprets the CR as indicating “success” (block 3108) and places therequested memory block within its L2 cache array 300. The master 232also sets the state field 306 associated with the requested memory blockto a state indicated by the CR. In particular, if the partial responsesand hence the CR indicate that a Sr′ snooper 236 may be hidden (block3146), the requesting L2 cache 230 holds the requested memory block inthe S state (block 3150) because only one Sr copy of the memory block ispermitted in any domain. Alternatively, if the partial responses and CRindicate that no Sr′ snooper 236 may be hidden, but an S′ snooper 236may be hidden, the requesting L2 cache 236 holds the requested memoryblock in the Sr state (block 3152). Finally, if neither a Sr′ or S′snooper 236 may be hidden (block 3148), the requesting L2 cache 230holds the requested memory block in the Me state (block 3154) becausethe requesting L2 cache 230 is guaranteed to belong to the only cachehierarchy within data processing system 100 holding the requested memoryblock 3000.

With reference now to FIG. 32, there is depicted a high level logicalflowchart of an exemplary method of performing a global bus readoperation in a data processing system implementing coherency domains anddomain indicators in accordance with the present invention. The processbegins at block 3200, for example, at block 1820 of FIG. 18, with an L2cache 230 issuing a global bus read operation on its local interconnect114. The various partial responses that snoopers 122, 236 may provide todistributed response logic 210 in response to snooping the global busread operation are represented in FIG. 32 by the outcomes of decisionblocks 3202, 3210, 3212, 3214, 3220, 3230, 3240, 3242, 3244, and 3246.These partial responses in turn determine the CR for the global bus readoperation.

As shown at block 3202, if a snooper 236 of an L2 cache 230 affirms theglobal bus read operation with a partial response indicating that the L2cache 230 holds the requested memory block in either the M or Me state,the process proceeds from block 3202 to block 3204. Block 3204 indicatesthe operations of the requesting L2 cache 230 and the affirming L2 cache230 in response to the global bus read operation. In particular, thesnooper 236 in the affirming L2 cache 230 updates the cache state of therequested memory block from M to T or from Me to Te. In addition, thesnooper 236 in the affirming L2 cache 230 may initiate transmission ofthe requested memory block to the requesting L2 cache 230 prior toreceipt of the CR (i.e., provides “early” data). Upon receipt, themaster 232 in the requesting L2 cache 230 places the requested memoryblock in L2 cache array 300 in the Sr state. The process ends withdistributed response logic 210 generating a CR indicating “success”, asdepicted at block 3208.

If a snooper 236 of an L2 cache 230 affirms the global bus readoperation with a partial response indicating that the L2 cache 230 holdsthe requested memory block in either the T or Te state (block 3210) andan Sr′ snooper 236 also affirms the bus read operation (block 3212), theprocess passes to block 3218. Block 3218 represents the Sr′ snooper 236updating the cache state of the requested memory block to S andinitiating transmission of the requested memory block to the requestingL2 cache 230 prior to receipt of the CR (i.e., provides “early” data).Upon receipt, the master 232 in the requesting L2 cache 230 places therequested memory block in L2 cache array 300 in the Sr state. The T orTe snooper 236 remains unchanged. The process ends with distributedresponse logic 210 generating a CR indicating “success”, as depicted atblock 3208.

If the complex of partial responses includes a T or Te snooper 236affirming the global bus read operation, no Sr′ snooper 236 affirmingthe bus read operation, and a snooper 236 providing an partial response(e.g., a type of retry) indicating that an Sr′ snooper 236 may exist inthe local data delivery domain but did not affirm the global bus readoperation, the process passes to block 3216. Block 3216 represents the Tor Te snooper 236 that affirmed the global bus read operation initiatingtransmission of the requested memory block to the requesting L2 cache230 after receipt of the CR (i.e., provides “late” data) and retainingthe requested memory block in the T or Te state. Upon receipt, themaster 232 in the requesting L2 cache 230 places the requested memoryblock in L2 cache directory 300 in the S state (since an Sr′ snooper 236may be hidden within the local domain the requesting cache 236 and onlyone Sr memory block is permitted in each domain). The process ends withdistributed response logic 210 generating a CR indicating “success”, asdepicted at block 3208.

If the complex of partial responses includes a T or Te snooper 236affirming the global bus read operation, no Sr′ snooper 236 affirmingthe bus read operation, and no snooper 236 providing a partial responsethat may hide a Sr′ snooper 236, the process passes to block 3206. Block3206 represents the T or Te snooper 236 that affirmed the global busread operation initiating transmission of the requested memory block tothe requesting L2 cache 230 after receipt of the CR (i.e., provides“late” data) and retaining the requested memory block in the T or Testate. Upon receipt, the master 232 in the requesting L2 cache 230places the requested memory block in L2 cache array 300 in the Sr state(since no other Sr′ snooper 236 exists for the requested memory block inthe local data delivery domain). The process ends with distributedresponse logic 210 generating a CR indicating “success”, as depicted atblock 3208.

Referring now to block 3220, if no M, Me, T or Te snooper 236 affirmsthe global bus read operation, but an Sr′ snooper 236 affirms the globalbus read operation, the global bus read operation is serviced inaccordance with block 3222. In particular, the Sr′ snooper 236 thataffirmed the global bus read operation initiates transmission of therequested memory block to the requesting L2 cache 230 prior to receiptof CR and updates the state of the requested memory block in its L2cache directory 302 to the S state. The master 232 in the requesting L2cache 230 places the requested memory block in L2 cache array 300 in theSr state. The process ends with distributed response logic 210generating a CR indicating “success”, as depicted at block 3208.

Turning now to block 3230, if no M, Me, T, Te or Sr′ snooper 236 affirmsthe global bus read operation, and further, if no snooper 122 provides apartial response indicating that it is responsible (i.e., the LPC) forthe requested memory block, an error occurs that halts processing asshown at block 3232 because every memory block is required to have anLPC.

Referring now to block 3240, if a snooper 122 provides a partialresponse indicating that it is responsible (i.e., the LPC) for therequested memory block but does not affirm the global bus readoperation, response logic 210 generates a CR indicating “retry”, asdepicted at block 3250. As indicated by decision block 3242, responselogic 210 similarly generates a “retry” CR at block 3250 if a memorycontroller snooper 122 affirms the global bus read operation and an L2cache snooper 236 provides a partial response indicating that it mayhold the requested memory block in one of the M, Me, T, or Te states butcannot affirm the global bus read operation. In each of these cases,response logic 210 generates a “retry” CR to cause the operation to bereissued because one of the possibly hidden snoopers 236 may be requiredto source the requested memory block to the requesting L2 cache 230.

With reference now to block 3244, if no M, Me, T, Te or Sr′ snooper 236affirms the global bus read operation, no M, Me, T, Te snooper 236 ispossibly hidden, and a memory controller snooper 122 affirms the globalbus read operation, the snooper 122 that affirmed the global bus readoperation provides the requested memory block 3000 and the associateddomain indicator 3004 to the requesting L2 cache 230 in response to theCR, as depicted at each of blocks 3252 and 3254. As shown at blocks3244, 3246, 3252, 3254 and 3256, the master 232 of the requesting L2cache 230 handles the requested memory block in accordance with thepartial responses compiled into the “success” CR represented at block3208. In particular, if the CR indicates that no Sr′ or S′ snooper 236is possibly hidden, the requesting L2 cache 230 holds the requestedmemory block in the Me state (block 3256); the requesting L2 cache 230holds the requested memory block in the Sr state if no Sr′ snooper 236is possibly hidden and a S′ snooper 236 is possibly hidden; and therequesting L2 cache 230 holds the requested memory block in the S stateif an Sr′ snooper 236 is possibly hidden.

In response to the CR, the memory controller snooper 122 that is the LPCfor the requested memory block 3000 then determines whether to updatethe domain indicator 3004 for the requested memory block 3000, asillustrated at blocks 3260, 3262, 3270, 3272 and 3274. If the CRindicates that the new cache state for the requested memory block 3000is Me, the LPC snooper 122 determines whether it is within the samedomain as the requesting L2 cache 230 (block 3260) and whether thedomain indicator 3004 in system memory 108 indicates local or global(blocks 3262 and 3272). If the LPC is within the same domain as therequesting L2 cache 230 (block 3260), the LPC snooper 122 sets thedomain indicator 3004 to “local” if it is reset to “global” (block 3262and 3264). If the LPC is not within the same domain as the requesting L2cache 230 (block 3260), the LPC snooper 122 resets the domain indicator3004 to “global” if it is set to “local” (block 3272 and 3274).

If the CR indicates that the new cache state for the requested memoryblock 3000 is S or Sr, the LPC snooper 122 similarly determines whetherit is within the same domain as the requesting L2 cache 230 (block 3270)and whether the domain indicator 3004 indicates local or global (block3272). If the LPC is within the same domain as the requesting L2 cache230 (block 3270), no update to the domain indicator 3004 is required.If, however, the LPC is not within the same domain as the requesting L2cache 230 (block 3270), the LPC snooper 122 resets the domain indicator3004 to “global” if it is set to “local” (block 3272 and 3274). Thus,LPC snooper 122 updates the domain indicator 3004, if required.

Referring now to FIG. 33, there is depicted a high level logicalflowchart of an exemplary method of performing a local bus RWITMoperation in a data processing system implementing coherency domains anddomain indicators in accordance with the present invention. The processbegins at block 3300, for example, with a master 232 of an L2 cache 230issuing a local bus RWITM operation its local interconnect 114 at block1948 of FIG. 19. The various partial responses that snoopers 122, 236may provide to distributed response logic 210 are represented in FIG. 33by the outcomes of decision blocks 3302, 3310, 3312, 3320, 3330, 3334,3340 and 3344. These partial responses in turn determine the CR for thelocal bus RWITM operation.

If a snooper 236 affirms the local bus RWITM operation with a partialresponse indicating that the L2 cache 230 containing the snooper 236holds the requested memory block in either the M or Me state as shown atblock 3302, the process proceeds from block 3302 to block 3304. Block3304 indicates the operations of the requesting L2 cache 230 and theaffirming L2 cache 230 in response to the local bus RWITM operation. Inparticular, the snooper 236 in the affirming L2 cache 230 updates thecache state of the requested memory block from the M state to the Istate and initiates transmission of the requested memory block to therequesting L2 cache 230, possibly prior to receipt of the CR (i.e.,provides “early” data). Upon receipt, the master 232 in the requestingL2 cache 230 places the requested memory block in L2 cache array 300 inthe M state. The process ends with distributed response logic 210generating a CR indicating “success”, as depicted at block 3306.

If a snooper 236 affirms the local bus RWITM operation with a partialresponse indicating that the L2 cache 230 containing the snooper 236holds the requested memory block in either the T or Te state as shown atblock 3310 and no Sr′ snooper 236 affirms the bus RWITM operation asshown at block 3312, the process passes to block 3314. Block 3314represents the T or Te snooper 236 that affirmed the local bus RWITMoperation initiating transmission of the requested memory block to therequesting L2 cache 230 in response to receipt of the “cleanup” CR(block 3318) from response logic 210. In response to receipt of therequested memory block, the requesting L2 cache 230 holds the requestedmemory block in the M state. All affirming snoopers 236 update theirrespective cache states for the requested memory block to I.

If the complex of partial responses includes a T or Te snooper 236 andan Sr′ snooper 236 affirming the local bus RWITM operation, the processpasses to block 3316. Block 3316 represents the Sr′ snooper 236 thataffirmed the local bus RWITM operation initiating transmission of therequested memory block to the requesting L2 cache 230 prior to receiptof the “cleanup” CR (block 3318) provided by response logic 210. Inresponse to receipt of the requested memory block 3000, the requestingL2 cache 230 holds the requested memory block in the M state. Allaffirming snoopers 236 update their respective cache states for therequested memory block to I.

The local bus RWITM operation cannot be serviced by a L2 cache snooper236 without retry if no M, Me, T, or Te snooper 236 (i.e., HPC) affirmsthe local bus RWITM operation to signify that it can mediate the datatransfer. Accordingly, if an Sr′ snooper 236 affirms the local bus RWITMoperation and supplies early data to the requesting L2 cache 230 asshown at block 3320, the master 232 of the requesting L2 cache 230discards the data provided by the Sr′ snooper 236, as depicted at block3322. However, as discussed further below, the local bus RWITM operationmay still be serviced locally without retry if the LPC snooper 122 iswithin the local domain (block 3330) and affirms the local bus RWITMoperation (block 3340) and the domain indicator 3004 for the requestedmemory block 3000 indicates “local” (block 3350).

Thus, if no memory controller snooper 122 provides a partial responseindicating that it is responsible (i.e., the LPC) for the requestedmemory block (block 3330), each affirming snooper 236 invalidates therequested memory block in its respective L2 cache directory 302 (block3332). The CR generated by response logic 210 depends upon whether anypartial responses indicate that an M, Me, T or Te snooper 236 may behidden (block 3334). That is, if no M, Me, T or Te snooper 236 may behidden, response logic 210 generates a “go global” CR at block 3336 toinform the master 232 that the local bus RWITM operation must bereissued as a global RWITM operation. On the other hand, if an M, Me, Tor Te snooper 236 (i.e., an HPC) for the requested memory block may behidden, response logic 210 generates a CR indicating “retry”, asdepicted at block 3338, because the operation may be serviced locally ifretried.

Similarly, snoopers 236 invalidate their respective copies of therequested memory block (block 3342), and response logic 210 provides a“retry” CR for the local bus RWITM operation (block 3338) if no M, Me,T, Te snooper 236 affirms the local bus RWITM operation and a snooper122 provides a partial response, but does not affirm the local bus RWITMoperation. A “retry” CR is also generated at block 3338, and snoopers236 invalidate their respective copies of the requested memory block(block 3342) if no M, Me, T or Te snooper 236 affirmed the local busRWTIM operation (blocks 3302, 3310), a snooper 122 affirmed the localbus RWITM operation (block 3340), and an M, Me, T, or Te snooper 236 maybe possibly hidden (block 3344).

As shown at block 3346, if no M, Me, T, or Te snooper 236 affirms thelocal bus RWITM operation or is possibly hidden and the LPC snooper 122affirms the local bus RWITM operation, each affirming snooper 236invalidates its respective copy of the requested memory block 3000. Inaddition, the LPC snooper 122 provides the requested memory block 3000and associated domain indicator 3004 to the requesting L2 cache 230 inresponse to receipt of the CR from response logic 210. The master 232 ofthe requesting L2 cache 230 handles the data in accordance with thedomain indicator 3004. In particular, if the domain indicator 3004 isreset to “global”, meaning that a remote cached copy may exist thatrenders stale the data received from the LPC snooper 122, master 232discards the data received from the LPC snooper 122, maintains aninvalid coherency state with respect to the requested memory block(block 3352), and interprets the CR provided by response logic 210 as“go global” (block 3336). If, on the other hand, the domain indicator3004 is set to “local”, meaning that no remote cached copy of therequested memory block renders the data received from the LPC snooper122 potentially stale, the master 232 places the requested memory block(and optionally the domain indicator 3004) in its L2 cache array 300 andsets the associated state field 306 to M (block 3346). If the partialresponses and hence the CR indicate an S′ or Sr′ snooper 236 is possiblyhidden (block 3354), the CR indicates “cleanup”, meaning that therequesting L2 cache 230 must invalidate the other valid cached copies ofthe requested memory block 3000, if any. If no such S′ or Sr′ snoopers236 are possibly hidden by incomplete partial responses, the CRindicates “success”, as depicted at block 3306.

With reference now to FIG. 34, there is illustrated a high level logicalflowchart of an exemplary method of performing a global bus RWITMoperation in a data processing system implementing coherency domains anddomain indicators in accordance with the present invention. The processbegins at block 3400, for example, with a master 232 of an L2 cache 230issuing a global bus RWITM operation on interconnects 110, 114 at block1954 of FIG. 19. The various partial responses that snoopers 122, 236may provide to distributed response logic 210 are represented in FIG. 34by the outcomes of decision blocks 3402, 3410, 3414, 3418, 3430, 3440,3442, 3444 and 3448. These partial responses in turn determine the CRfor the global bus RWITM operation.

If a snooper 236 affirms the global bus RWITM operation with a partialresponse indicating that the L2 cache 230 containing the snooper 236holds the requested memory block in the Me state as shown at block 3402,the process proceeds from block 3402 to block 3474. Block 3474illustrates the Me snooper 236 determining whether it is local to (i.e.,in the same domain as) the requesting master 232, for example, byreference to the scope indicator in the bus operation. If not, the Mesnooper 236 invalidates its copy of the requested memory block 3000, atdepicted at block 3472, and response logic 210 generates a “retry” CR,as shown at block 3409. In response to receipt of the “retry” CR, theLPC snooper 122 may also set the domain indicator for the requestedmemory block 3000 to “local” if the CR supports this functionality. If,on the other hand, Me snooper 236 determines at block 3474 that it iswithin the same domain as the requesting master 232, the Me snooper 236initiates provision of the requested memory block to master 232 prior toreceipt of the CR and invalidates its copy of the requested memory block(block 3407). In response to receipt of the requested memory block, themaster 232 places the requested memory block in its L2 cache array 300in the M state (block 3407). Response logic 210 also generates a CRindicating “success”, as shown at block 3428.

Similarly, if an M snooper 236 affirms the global bus RWITM operation,as illustrated at block 3403, the M snooper 236 handles the operationdifferently depending upon whether it is within the same domain as therequesting master 232 (block 3404). If not, the M snooper 236 in theaffirming L2 cache 230 performs a cache castout operation (block 3406)to “push” its modified copy of the requested memory block to the systemmemory 108 that serves as the LPC for the requested memory block andinvalidates its copy of the requested memory (block 3408). Responselogic 210 provides a CR indicating “retry” at block 3409. If, on theother hand, the M snooper 236 is local to the requesting master 232, theM snooper 236 updates the cache state of the requested memory block fromthe M state to the I state and initiates transmission of the requestedmemory block to the requesting L2 cache 230 prior to receipt of the CR(i.e., provides “early” data), as depicted at block 3407. Upon receipt,the master 232 in the requesting L2 cache 230 places the requestedmemory block in the associated L2 cache array 300 in the M state. Theprocess ends with distributed response logic 210 generating a CRindicating “success”, as depicted at block 3428.

Turning now to block 3410, if a snooper 236 affirms the global bus RWITMoperation with a partial response indicating that the L2 cache 230containing the snooper 236 holds the requested memory block in eitherthe T or Te state, the process passes to block 3412, which representsthe T or Te snooper 236 determining whether or not it is local to therequesting master 232. If not, the global bus RWITM operation is handledin accordance with blocks 3406, 3408 and 3409, which are describedabove. In addition, as illustrated at blocks 3414 and 3416, any earlydata provided by an Sr′ snooper 236 in response to the global bus RWITMoperation is discarded by the requesting master 232. If, however, the Tor Te snooper 236 determines at block 3412 that it is local therequesting master 232, the global bus RWITM operation is serviced inaccordance with either block 3420 or block 3422. That is, as shown atblock 3420, if no Sr′ snooper 236 affirms the global bus RWITM operation(block 3418), the T or Te snooper 236 that affirmed the global bus RWITMoperation initiates transmission of the requested memory block to therequesting L2 cache 230 in response to receipt of the CR (i.e., provides“late” data). In response to receipt of the requested memory block, therequesting L2 cache 230 holds the requested memory block in the M state.In addition, all affirming snoopers 236 update their respective cachestates for the requested memory block to I. Alternatively, as depictedat block 3422, if an Sr′ snooper 236 affirms the global bus RWITMoperation (block 3418), the Sr′ snooper 236 initiates transmission ofthe requested memory block to the requesting L2 cache 230 prior toreceipt of the CR (i.e., provides “early” data). In response to receiptof the requested memory block, the requesting L2 cache 230 holds therequested memory block in the M state. In addition, all affirmingsnoopers 236 update their respective cache states for the requestedmemory block to I.

As further illustrated at blocks 3426 and 3428, the data transfer to therequesting L2 cache 230 is permitted even in the presence of partialresponse(s) indicating the presence of a possibly hidden S′ or Sr′snooper 236. If no hidden S′ or Sr′ snoopers 236 exist, the process endswith distributed response logic 210 generating a CR indicating“success”, as depicted at block 3406. If, on the other hand, at leastone partial response indicating the presence of a possibly hidden S′ orSr′ snooper 236 was given in response to the global bus RWITM operation,distributed response logic 210 generates a CR indicating “cleanup”,meaning that the requesting L2 cache 230 must issue one or more bus killoperations to invalidate the requested memory block in any such hiddenS′ or Sr′ snooper 236.

Referring now to block 3430, if no M, Me, T, or Te snooper 236 affirmsthe global bus RWITM operation, and further, if no snooper 122 providesa partial response indicating that it is responsible (i.e., the LPC) forthe requested memory block, an error occurs causing processing to halt,as depicted at block 3432. If, on the other hand, no M, Me, T, or Tesnooper 236 affirms the bus RWITM operation and a snooper 122 provides apartial response indicating that it is responsible (i.e., the LPC) forthe requested memory block but does not affirm the bus RWITM operation(block 3440), each affirming snooper 236 invalidates the requestedmemory block in its respective L2 cache directory 302 (block 3452), andresponse logic 210 generates a CR indicating “retry”, as depicted atblock 3454. In addition, data provided by an Sr′ snooper 236 affirmingthe global bus RWITM operation, if any, is discarded by the master 232(blocks 3448 and 3450). As indicated by decision block 3442, affirmingsnoopers 236 similarly invalidate their respective copies of therequested memory block at block 3452 and response logic 210 generates a“retry” CR at block 3454 if a memory controller snooper 122 affirms thebus RWITM operation (block 3440) and an L2 cache snooper 236 provides apartial response indicating that it may hold the requested memory blockin one of the M, Me, T, or Te states but cannot affirm the global busRWITM operation.

With reference now to block 3444, if no M, Me, T, or Te snooper 236affirms the global bus RWITM operation or is possibly hidden, a snooper122 affirms the global bus RWITM operation, and an Sr′ snooper 236affirms the global bus RWITM operation, the global bus RWITM operationis serviced in accordance with block 3422 and following blocks, whichare described above. Assuming these same conditions except for thepresence of an Sr′ snooper 236 affirming the global bus RWITM operation,the global bus RWITM operation is serviced in accordance with block3446. In particular, in response to the CR, the LPC snooper 122 providesthe requested memory block 3000 and domain indicator 3004 to therequesting L2 cache 230, which obtains the requested memory block in theM state, and all affirming snoopers 236 invalidate their respectivecopies of the requested memory block, if any.

Following block 3446, the process passes to blocks 3460-3466, whichcollectively represent the LPC snooper 122 determining whether or not toupdate the domain indicator 3004 for the requested memory block 3000based upon whether the LPC snooper 122 is local to the requesting master232 (block 3460) and the present state of the domain indicator (blocks3462 and 3464). LPC snooper 122 changes the state of the domainindicator 3004 at block 3466 if LPC snooper 122 is local to therequesting master 232 and domain indicator 3004 is reset to indicate“global” or if LPC snooper 122 is not local to the requesting master 232and domain indicator 3004 is set to indicate “local”.

If the partial responses indicate an S′ or Sr′ snooper 236 is possiblyhidden (block 3424), the requesting L2 cache 230 receives a “cleanup” CRindicating that it must invalidate any other valid cached copies of therequested memory block. If no S′ or Sr′ snoopers 236 are possibly hiddenby incomplete partial responses, response logic 210 generates a“success” CR, as depicted at block 3428.

Referring now to FIG. 35, there is depicted a high level logicalflowchart of an exemplary method of performing a global bus DClaimoperation in a data processing system implementing coherency domains anddomain indicators in accordance with the present invention. The processbegins at block 3500, for example, with a master 232 of an L2 cache 230issuing a global bus DClaim operation on interconnects 110, 114 at block1940 of FIG. 19. The various partial responses that snoopers 122, 236may provide to distributed response logic 210 in response to the globalbus DClaim operation are represented in FIG. 35 by the outcomes ofdecision blocks 3502, 3510, 3518, 3530, 3540 and 3542. These partialresponses in turn determine what CR response logic 210 generates for theglobal bus DClaim operation.

As shown at block 3502, if any snooper 236 issues a partial responsedowngrading the global bus DClaim operation to a global bus RWITMoperation, each affirming snooper 236 other than the downgrading snooper236 invalidates its respective copy of the requested memory block, ifany (block 2603), and distributed response logic 210 generates a CRindicating “downgrade”, as shown at block 3504. In response to this CR,the master 232 of the global bus DClaim operation will next attempt togain ownership of the requested memory block utilizing a bus RWITMoperation, as depicted at blocks 1948 and 1954 of FIG. 19.

If a snooper 236 affirms the global bus DClaim operation with a partialresponse indicating that the L2 cache 230 containing the snooper 236holds the requested memory block in either the T or Te state as shown atblock 3510, the process passes to block 3512. Block 3512 depicts the Tor Te snooper 236 determining whether it is local to the requestingmaster 232. If not, the T or Te snooper 236 performs a cache castoutoperation (block 3514), and each affirming snooper 236 invalidates itscopy of the requested memory block 3000. In addition, distributedresponse logic 210 generates a CR indicating “retry”, as illustrated atblock 3506.

Returning to block 3512, if the T or Te snooper 236 determines that itis local to the requesting master 232, the global bus DClaim operationis handled in accordance with block 3516. In particular, the master 232in the requesting L2 cache 230 updates the state of its copy of therequested memory block to the M state. All affirming snoopers 236 updatetheir respective cache states for the requested memory block to I. Asshown at blocks 3518, 3520 and 3522, if the partial responses indicatethat no S′ or Sr′ snooper 236 is possibly hidden, the process ends withdistributed response logic 210 generating a CR indicating “success”(block 3522). If, on the other hand, at least one partial responseindicating the presence of a possibly hidden S′ or Sr′ snooper 236 wasgiven in response to the global bus DClaim operation, distributedresponse logic 210 generates a CR indicating “cleanup” (block 3520),meaning that the requesting L2 cache 230 must issue one or more bus killoperations to invalidate the requested memory block in any such hiddenS′ or Sr′ snooper 236.

Turning now to block 3530, if no T or Te snooper 236 affirms the globalbus DClaim operation, and further, if no snooper 122 provides a partialresponse indicating that it is responsible (i.e., the LPC) for therequested memory block 3000, an error occurs causing processing to halt,as depicted at block 3532. If, on the other hand, no T or Te snooper 236affirms the global bus DClaim operation and a snooper 122 provides apartial response indicating that it is responsible (i.e., the LPC) forthe requested memory block but does not affirm the global bus DClaimoperation (block 3540), each affirming snooper 236 invalidates itsrespective copy of the requested memory block, if any (block 3505), andresponse logic 210 generates a CR indicating “retry”, as depicted atblock 3506. As indicated by decision block 3542, response logic 210similarly generates a “retry” CR at block 3506 and each affirmingsnooper 236 invalidates its respective copy of the requested memoryblock, if any (block 3505) if a memory controller snooper 122 affirmsthe bus DClaim operation (block 3540) and an L2 cache snooper 236provides a partial response indicating that it may hold the requestedmemory block in one of the T or Te states but cannot affirm the globalbus DClaim operation.

As depicted at block 3542, if no T or Te snooper 236 affirms the globalbus DClaim operation or is possibly hidden and a snooper 122 affirms theglobal bus DClaim operation, the global bus DClaim operation is servicedin accordance with block 3516 and following blocks, which are describedabove.

With reference now to FIG. 36, there is illustrated a high level logicalflowchart of an exemplary method of performing a global bus DCBZoperation in a data processing system implementing coherency domains anddomain indicators in accordance with the present invention. The processbegins at block 3600, for example, with the master 232 of an L2 cache230 issuing a global bus DCBZ operation on interconnects 110, 114 atblock 2060 of FIG. 20. The various partial responses that snoopers 122,236 may provide to distributed response logic 210 are represented inFIG. 36 by the outcomes of decision blocks 3602, 3610, 3612, 3630, 3638and 3650. These partial responses in turn determine the CR for theglobal bus DCBZ operation.

As indicated at blocks 3602-3604, if no snooper 122 provides a partialresponse indicating that it is responsible (i.e., the LPC) for therequested memory block 3000, an error halting processing occurs, sinceno LPC was found. If a snooper 122 indicates that it is the LPC for therequested memory block 3000, but does not affirm the global DCBZoperation, each affirming snooper 236 invalidates its respective copy ofthe requested memory block, if any (block 3651), and response logic 210generates a CR indicating “retry”, as depicted at block 3652. A “retry”CR is similarly generated by response logic 210 at block 3652 and eachaffirming snooper 236 invalidates its respective copy of the requestedmemory block, if any (block 3651) if a snooper 122 affirms the globalbus DCBZ operation (block 3610), no M, Me, T or Te snooper 236 affirmsthe global bus DCBZ operation (blocks 3612 and 3630), and an M, Me, T orTe snooper 236 is possibly hidden (block 3650).

If a snooper 236 affirms the global bus DCBZ operation with a partialresponse indicating that the L2 cache 230 containing the snooper 236holds the requested memory block in either the M or Me state as shown atblock 3612, the process proceeds to block 3614. Block 3614 indicates theoperations of the requesting L2 cache 230 and the affirming L2 cache 230in response to the global bus DCBZ operation. In particular, the master232 in the requesting L2 cache 230 updates the cache state of therequested memory block to the M state (no data is transferred), and thesnooper 236 in the affirming L2 cache 230 updates the cache state of therequested memory block to the I state. As further shown at block 3616and 3618, the LPC snooper 122 also resets the domain indicator 3004associated with the requested memory block 3000 to “global” if the LPCsnooper 122 is not within the same coherency domain as the requestingmaster 232. The process ends with distributed response logic 210generating a CR indicating “success”, as depicted at block 3620.

If a snooper 236 affirms the global bus DCBZ operation with a partialresponse indicating that the L2 cache 230 containing the snooper 236holds the requested memory block in either the T or Te state as shown atblock 3630, the process passes to block 3632. Block 3632 represents theT or Te snooper 236 invalidating its copy of the requested memory blockand the master 232 in the requesting L2 cache 230 updating the cachestate of its copy of the requested memory block to the M state. Asfurther shown at block 3634 and 3636, the LPC snooper 122 also resetsthe domain indicator 3004 associated with the requested memory block3000 to “global” if the LPC snooper 122 is not within the same coherencydomain as the requesting master 232. If at least one partial responseindicating the presence of a possibly hidden S′ or Sr′ snooper 236 wasgiven in response to the global bus DCBZ operation, distributed responselogic 210 generates a CR indicating “cleanup”. If the partial responsesindicate that no S′ or Sr′ snooper 236 is possibly hidden, distributedresponse logic 210 provides a CR indicating “success” as shown at block3606.

As indicated by decision block 3650, if a memory controller snooper 122affirms the global bus DCBZ operation (block 3610) and no M, Me, T or Tesnooper 236 affirms the global bus DCBZ operation or is possibly hidden(blocks 3612, 3630 and 3650), the global bus DCBZ operation is servicedas described above with reference to block 3632 and following blocks.

Referring now to FIG. 37, there is depicted a high level logicalflowchart of an exemplary method of performing a global bus writeoperation in a data processing system implementing coherency domains anddomain indicators in accordance with the present invention. The processbegins at block 3700, for example, with an I/O controller 214 issuing aglobal bus write operation on interconnects 110, 114 at block 2220 ofFIG. 22. The various partial responses that snoopers 122, 236 mayprovide to distributed response logic 210 are represented in FIG. 37 bythe outcomes of decision blocks 3710, 3720, 3724, and 3726. Thesepartial responses in turn determine the CR for the global bus writeoperation.

As depicted at block 3710, if no snooper 122 provides a partial responseindicating that it is responsible (i.e., the LPC) for the requestedmemory block 3000, an error occurs, causing processing to halt, asdepicted at block 3712. If, however, a snooper 122 provides a partialresponse indicating that it is responsible (i.e., the LPC) for therequested memory block 3000 but does not affirm the bus write operation(block 3720), each affirming snooper 236 invalidates its respective copyof the requested memory block, if any (block 3721), and response logic210 generates a CR indicating “retry”, as depicted at block 3722. A“retry” CR is generated because the LPC must be available to receive therequested memory block 3000. Response logic 210 similarly generates a“retry” CR (block 3722) and each affirming snooper 236 invalidates itsrespective copy of the requested memory block, if any (block 3721) if amemory controller snooper 122 affirms the global bus write operation buta partial response indicates that an M, Me, T or Te snooper 236 may bepossibly hidden (blocks 3724 and 3722). In this case, a “retry” CR isgenerated so that the global bus write operation only succeeds when noHPC copy of the requested memory block remains in the system.

Referring again to block 3724, assuming that a snooper 122 affirms theglobal bus write operation as the LPC and no partial responses aregenerated that indicate that a M, Me, T or Te snooper 236 may bepossibly hidden, the requesting I/O controller 214 transmits therequested memory block to the LPC snooper 122, and snoopers 236, if any,affirming the global bus write operation invalidate their respectivecopies of the requested memory block (block 3728 or block 3740). Asrepresented by blocks 3726 and 3730, if the partial responses indicatethat no S′ or Sr′ snooper 236 is possibly hidden, the process ends withdistributed response logic 210 generating a CR indicating “success”. Inaddition, the LPC snooper 122 sets the domain indicator 3004 associatedwith the requested memory block 3000 to indicate “local” (block 3728).If, on the other hand, at least one partial response indicating thepresence of a possibly hidden S′ or Sr′ snooper 236 was given inresponse to the global bus write operation, distributed response logic210 generates a CR indicating “cleanup” (block 3742), and the LPCsnooper 122 resets the domain indicator 3004 associated with therequested memory block 3000 to indicate “global” (block 3740).

With reference now to FIG. 38, there is illustrated a high level logicalflowchart of an exemplary method of performing a local bus writeoperation in a data processing system implementing coherency domains anddomain indicators in accordance with preferred embodiments of thepresent invention. The process begins at block 3800, for example, withthe issuance of a local bus write operation on a local interconnect 114at block 2204 of FIG. 22. The various partial responses that snoopers122, 236 may provide to distributed response logic 210 are representedin FIG. 38 by the outcomes of decision blocks 3802, 3810, 3812, 3820,3822 and 3830. These partial responses in turn determine the CR for thelocal bus write operation.

If no snooper 122 provides a partial response indicating that it isresponsible (i.e., the LPC) for the target memory block (block 3802),each affirming snooper 236 invalidates its respective copy of the targetmemory block, as shown at block 3804, and response logic 210 provides a“go global” CR, as illustrated at block 3806, because the LPC is anecessary participant in the bus write operation. As depicted at block3810, if a snooper 122 provides a partial response indicating that it isresponsible (i.e., the LPC) for the requested memory block 3000 but doesnot affirm the local bus write operation (block 3812) and a M or Mesnooper 236 affirms the local bus write operation (block 3810), eachaffirming snooper 236 invalidates its respective copy of the requestedmemory block, if any (block 3824), and response logic 210 generates a CRindicating “retry local”, as depicted at block 3818. A “retry local” CRis generated because the LPC must be available to receive the targetmemory block. Response logic 210 similarly generates a “retry” CR atblock 3834 if a memory controller snooper 122 indicates that it is theLPC for the target memory block, no M, Me, T or Te snooper 236 affirmsthe local bus write operation, and a partial response indicates that aM, Me, T or Te snooper 236 may be hidden (block 3830). In this case,each affirming snooper 236 invalidates its copy, if any, of the targetmemory block, and response logic 210 generates a “retry” CR so that thelocal bus write operation only succeeds when no HPC copy of therequested memory block remains in the system.

Referring again to block 3812, assuming that a M or Me snooper 236affirms the local bus write operation and a snooper 122 affirms thelocal bus write operation as the LPC, the requesting I/O controller 214transmits the requested memory block to the LPC snooper 122, andsnoopers 236, if any, affirming the local bus write operation invalidatetheir respective copies of the requested memory block (block 3814). Inaddition, the LPC snooper 122 sets the domain indicator 3004 associatedwith the target memory block 3000 to “local”. The process ends at block3816 with distributed response logic 210 generating a CR indicating“success”.

As depicted at block 3820 and following blocks, if a snooper 122provides a partial response indicating that it is the LPC for the targetmemory block (block 3802) but cannot affirm the local bus writeoperation (block 3822), no M or Me snooper 236 affirms the local buswrite operation (block 3810), and a T or Te snooper 236 affirms thelocal bus write operation, distributed response logic 210 generates a CRindicating “retry local” (block 3818) to force the operation to bereissued locally, and snoopers 236 affirming the local bus writeoperation invalidate their respective copies of the requested memoryblock (block 3824). Assuming the same partial responses except for theLPC snooper 122 affirming the local bus write operation (block 3822),the requesting I/O controller 214 transmits the requested memory blockto the LPC snooper 122, and each snooper 236 affirming the local buswrite operation invalidates its respective copy of the requested memoryblock (block 3826). In addition, the LPC snooper 122 sets the domainindicator 3004 associated with the target memory block 3000 to “local”.The process ends with distributed response logic 210 generating a CRindicating “cleanup” so that any other copies of the requested memoryblock that may be held outside of the local coherency domain areinvalidated.

Referring now to FIG. 39, there is depicted a high level logicalflowchart of an exemplary method of performing a local bus castoutoperation in a data processing system implementing coherency domains anddomain indicators in accordance with preferred embodiments of thepresent invention. The process begins at block 3900, for example, withthe issuance of a local bus castout operation on a local interconnect114, for example, at block 1806 of FIG. 18, block 1970 of FIG. 19, orblock 2042 of FIG. 20. The various partial responses that snoopers 122,236 may provide to distributed response logic 210 are represented inFIG. 39 by the outcomes of decision blocks 3902 and 3910. These partialresponses in turn determine the CR for the local bus castout operation.

If a snooper 236 affirms the local bus castout operation with a partialresponse indicating that the L2 cache 230 containing the snooper 236holds the requested memory block in any of the M, Me, T or Te states asshown at block 3902, an error halting processing occurs, as indicated atblock 3904, because the memory block being castout can have only one HPC(i.e., the requesting L2 cache 230).

As depicted at block 3910, if no M, Me, T, or Te snooper 236 affirms thelocal bus castout operation (block 3902), and further, if no snooper 122provides a partial response indicating that it is responsible (i.e., theLPC) for the requested memory block, response logic 210 provides a “goglobal” CR, as depicted at block 3912, because the LPC is a requiredparticipant to receive the castout memory block. If, however, no M, Me,T, or Te snooper 236 affirms the bus castout operation (block 3902) anda snooper 122 provides a partial response indicating that it isresponsible (i.e., the LPC) for the requested memory block but does notaffirm the bus castout operation (blocks 3910 and 3920), response logic210 generates a CR indicating “local retry”, as depicted at block 3930,because the LPC is in the local coherency domain but must be availableto receive the castout memory block. If a memory controller snooper 122affirms the bus castout operation (block 3920) and no M, Me, T or Tesnooper 236 affirms the bus castout operation (block 3902), therequesting L2 cache 230 invalidates the memory block within its cachedirectory 302 and transmits the memory block to the LPC (block 3924 orblock 3928). In addition to updating the memory block 3000, the LPCsnooper 122 sets the associated domain indicator 3004 to “local” if thememory block 3000 is in the M or Me state (blocks 3922 and 3924), andresets the associated domain indicator 3004 to “global” if the memoryblock 3000 is in the T or Te state (blocks 3922 and 3928). The update ofthe domain indicator 3004 to “local” is possible because a castout of amemory block in either of the M or Me states guarantees that no remotelycached copy of the memory block exists. In response to an affirmativedetermination at block 3920, response logic 210 generates a CRindicating “success”, as illustrated at block 3926.

With reference now to FIG. 40, there is illustrated a high level logicalflowchart of an exemplary method of performing a global bus castoutoperation in a data processing system implementing coherency domains anddomain indicators in accordance with the present invention. The processbegins at block 4000, for example, with a master 232 of an L2 cache 230issuing a global bus castout operation on interconnects 110, 114, forexample, at block 2302 of FIG. 23. The various partial responses thatsnoopers 122, 236 may provide to distributed response logic 210 arerepresented in FIG. 40 by the outcomes of decision blocks 4002, 4010 and4020. These partial responses in turn determine the CR for the globalbus castout operation.

If a snooper 236 affirms the global bus castout operation with a partialresponse indicating that the L2 cache 230 containing the snooper 236holds the requested memory block in any of the M, Me, T or Te states asshown at block 4002, an error halting processing occurs, as indicated atblock 4004, because the memory block being castout can have only one HPC(i.e., the requesting L2 cache 230).

As depicted at block 4020, if no M, Me, T, or Te snooper 236 affirms theglobal bus castout operation, and further, if no snooper 122 provides apartial response indicating that it is responsible (i.e., the LPC) forthe requested memory block 3000, an error occurs causing processing tohalt, as depicted at block 4012. If, however, no M, Me, T, or Te snooper236 affirms the bus castout operation and a snooper 122 provides apartial response indicating that it is responsible (i.e., the LPC) forthe requested memory block but does not affirm the global bus castoutoperation (block 4020), response logic 210 generates a CR indicating“retry”, as depicted at block 4030, because the LPC must be available toreceive the castout memory block. If a memory controller snooper 122affirms the bus castout operation and no M, Me, T or Te snooper 236affirms the global bus castout operation (block 4020), the requesting L2cache 230 invalidates the memory block within its cache directory 302and transmits the memory block to the LPC (block 4024 or block 4028). Inaddition to updating the memory block 3000, the LPC snooper 122 sets theassociated domain indicator 3004 to “local” if the memory block 3000 isin the M or Me state (blocks 4022 and 4024), and resets the associateddomain indicator 3004 to “global” if the memory block 3000 is in the Tor Te state (blocks 4022 and 4028). The update of the domain indicator3004 to “local” is possible because a castout of a memory block 3000 ineither of the M or Me states guarantees that no remotely cached copy ofthe memory block exists. In response to an affirmative determination atblock 4020, response logic 210 generates a CR indicating “success”, asillustrated at block 4026.

Referring now to FIG. 41, there is depicted a high level logicalflowchart of an exemplary method of performing a bus partial writeoperation in a data processing system implementing coherency domains anddomain indicators in accordance with the present invention. The processbegins at block 4100, for example, with an I/O controller 214 issuing aglobal bus partial write operation on interconnects 110, 114 at block922 of FIG. 9B. The various partial responses that snoopers 122, 236 mayprovide to distributed response logic 210 are represented in FIG. 41 bythe outcomes of decision blocks 4110, 4120, 4122, 4134 and 4138. Thesepartial responses in turn determine the CR for the global bus partialwrite operation.

As depicted at block 4110, if no snooper 122 provides a partial responseindicating that it is responsible (i.e., the LPC) for the requestedpartial memory block, an error occurs causing processing to halt, asdepicted at block 4112. If, however, a snooper 122 provides a partialresponse indicating that it is responsible (i.e., the LPC) for therequested partial memory block but does not affirm the global buspartial write operation (block 4120), each affirming snooper 236invalidates its respective copy of the requested memory block, if any(block 4132), and response logic 210 generates a CR indicating “retry”,as depicted at block 4128. A “retry” CR is generated because the LPCmust be available to receive the partial memory block. Response logic210 similarly generates a “retry” CR at block 4128 and each affirmingsnooper 236 invalidates its respective copy of the requested memoryblock, if any (block 4132) if a memory controller snooper 122 affirmsthe global bus partial write operation, no M, Me, T, or Te snooper 236affirms the global bus partial write operation (blocks 4122 and 4130),but a partial response indicates that a M, Me, T or Te snooper 236 maybe possibly hidden (blocks 4134 and 4128).

If a memory controller snooper 122 affirms the bus partial writeoperation and an M, T, or Te snooper 236 affirms the global bus partialwrite operation (block 4122), the M, T or Te snooper 236 initiates acache castout operation of the cache line containing the partial memoryblock, as depicted at block 4124 and as described above. Each othersnooper 236 affirming the global bus partial write operation, if any,invalidates its copy of the memory block, as shown at block 4126. Asfurther illustrated at block 4128, response logic 210 generates a“retry” CR. Thus, a “retry” CR is generated, as depicted at block 4128,so that the global bus partial write operation only succeeds when no HPCcopy of the requested partial memory block remains in the system.

The global bus partial write operation is handled similarly if a memorycontroller snooper 122 affirms the global bus partial write operationand an Me snooper 236 affirms the global bus partial write operation(block 4130), except that no castout is required because the cached copyof the memory block is unmodified. Accordingly, the Me snooper 236affirming the global bus partial write operation invalidates its copy ofthe target memory block at block 4132, and response logic 210 provides a“retry” CR, as depicted at block 4128.

Referring again to block 4134, assuming that a snooper 122 affirms theglobal bus partial write operation as the LPC, no M, Me, T or Te snooper236 affirms the global bus partial write operation, and no partialresponses are generated that indicate that a M, Me, T or Te snooper 236may be possibly hidden, the requesting L2 cache 230 transmits thepartial memory block to the LPC snooper 122, and snoopers 236, if any,affirming the global bus partial write operation invalidate theirrespective copies of the requested memory block (block 4136). Inaddition, the LPC snooper 122 updates the domain indicator 3004 for theupdated memory block to “global”. As shown at blocks 4138 and 4140, ifthe partial responses indicate that no hidden S′ or Sr′ snooper 236exists, the process ends with distributed response logic 210 generatinga CR indicating “success”. If, on the other hand, at least one partialresponse indicating the presence of a possibly hidden S′ or Sr′ snooper236 was given in response to the global bus partial write operation,distributed response logic 210 generates a CR indicating “cleanup”(block 4142), meaning that the requesting I/O controller 214 must issueone or more bus kill operations to invalidate the requested memory blockin any such hidden S′ or Sr′ snooper 236.

VI. Domain Indicator Storage

A. Storage of Domain Indicators at System Memory

In the foregoing description, it has been assumed that the domainindicators described herein are simply stored together with theassociated memory blocks in system memory as shown in FIG. 30. Inaccordance with one aspect of the present invention, the storage ofdomain indicators in system memory can be improved through the reuse ofexisting “spare” storage.

With reference now to FIG. 42, there is illustrated an exemplaryembodiment of a system memory organization that provides improvedstorage of domain indicators in accordance with the present invention.As shown, an individual system memory 108 (e.g., system memory 108 a or108 b of FIG. 1) is coupled by a memory bus 4200 to a memory controller106 that controls read and write access to the information in systemmemory 108. In an exemplary embodiment, each system memory 108 isimplemented with multiple redrive (RD) chips 4202 a-4202 d, eachproviding address and data connections for multiple (in this case two)Dynamic Random Access Memory (DRAM) Dual Inline Memory Modules (DIMMs)4204. That is, RD chip 4202 a is connected to DIMMs 4204 a, 4204 e; RDchip 4202 b is connected to DIMMs 4204 b, 4204 f; RD chip 4202 c isconnected to DIMMs 4204 c, 4204 g; and RD chip 4202 d is connected toDIMMs 4204 d, 4204 h. The DIMMs 4204 comprising each system memory 108are further organized into multiple “ranks” 4206 a-4206 b eachcontaining one DIMM 4204 connected to each of RD chips 4202 a-4202 d.For example, rank 4206 a includes DIMMs 4204 a-4204 d, and rank 4206 bincludes DIMMs 4204 e-4204 h. Real memory addresses may be “striped”across the DIMMs 26 comprising each rank 4206 so that access latency forfull cache line memory accesses is reduced.

Referring now to FIG. 43, there is depicted a more detailed blockdiagram of an exemplary implementation of the DIMMs 4204 forming onerank 4206 of a system memory 108. In the depicted embodiment, each DIMM4204 contains 9 Dynamic Random Access Memory (DRAM) chips 4300 that areeach 8 bits wide. Each row in an individual DIMM 4204 was thusoriginally designed to provide 8 bytes of data storage in 8 of DRAMchips 4300 and 1 associated “spare” byte of storage for the ECC in theninth DRAM chip 4300. According to the present invention, however, the 4DIMMs 4204 forming a rank 4206 are aggregated to provide storage for32-byte (255-bit) memory blocks, each having 4 bytes of “spare” storage.Because each 32-byte memory block only requires 24 bits of ECC, the ECCfor a memory block is preferably striped across corresponding DRAM chips4300 in 3 DIMMs 4204, as shown, leaving 8 additional bits of storage inone DRAM chip 4300 for each row of storage.

These 8 additional bits of storage are primarily used by memorycontroller 106 as replacement storage in case of a hard failure in anyone of the other 35 bytes of storage in the same row. Until needed asreplacement storage, 1 of the 8 spare bits in each row is preferablyutilized by memory controller 106 to store a domain indicator 3004 forthe associated 32-byte memory block 3000. If memory controller 106subsequently utilizes the 8 spare bits in a row as replacement storage,meaning that storage for the domain indicator 3004 of the row is nolonger available, memory controller 106 implies a domain indicator 3004reset to indicate “global” for that row to ensure that coherency ismaintained. In this manner, the storage capacity requirements of systemmemory 108 are reduced.

B. Storage of Domain Indicators in Cache

In accordance with the present invention, storage of domain indicatorsin cache memory, such as L2 caches 230, can also be enhanced. Inparticular, in the embodiment of data processing system 100 describedwith reference to FIG. 30, domain indicators 3004 are received by L2caches 230 in conjunction with the associated memory blocks and mayoptionally be stored with the memory blocks in L2 cache arrays 300.While this arrangement permits a simplified data flow for domainindicators, when a first L2 cache 230 responds to a bus RWITM operationof a second L2 cache 230 residing in a different coherency domain bysupplying the requested memory block, no “global” indicator remainscached in the local coherency domain. Thus, the LPC must be accessed todetermine whether or not the memory block is known to be cached, if atall, only locally. Consequently, as shown, for example, at blocks3406-3409 of FIG. 34, if an HPC for a memory block receives a bus RWITMoperation from a requestor in a remote coherency domain, the systemresponds with a retry-push including a cache castout of the requestedmemory block and retry of the bus RWITM operation. As will beappreciated, it would be preferable to eliminate the latency andbandwidth utilization associated with retry-push responses.

The present invention recognizes that it would therefore be desirable toreduce access latency to a domain indication in cases in which no copyof a memory block remains cached in a coherency domain through the useof an additional cache state, referred to herein as Ig (Invalid global).The Ig state is defined herein as a cache coherency state indicating (1)the associated memory block in the cache array is invalid, (2) theaddress tag in the cache directory is valid, and (3) a copy of thememory block identified by the address tag may possibly be cached inanother coherency domain.

The Ig state is formed in a lower level cache in response to that cacheproviding a requested memory block to a requestor in another coherencydomain in response to an exclusive access request (e.g., a bus RWITM orbus DClaim operation). In some embodiments of the present invention, itmay be preferable to form the Ig state only in the coherency domaincontaining the LPC for the memory block. In such embodiments, somemechanism (e.g., a partial response by the LPC and subsequent combinedresponse) must be implemented to indicate to the cache sourcing therequested memory block that the LPC is within its local coherencydomain. In other embodiments that do not support the communication of anindication that the LPC is local, an Ig state may be formed any timethat a cache sources a memory block to a remote coherency domain inresponse to an exclusive access request.

Because cache directory entries including an Ig state carry potentiallyuseful information, it is desirable in at least some implementations topreferentially retain entries in the Ig state over entries in the Istate (e.g., by modifying the Least Recently Used (LRU) algorithmutilized to evaluate LRU field 308 to select a victim cache entry forreplacement). As Ig directory entries are retained in cache, it ispossible for some Ig entries to become “stale” over time in that a cachewhose exclusive access request caused the formation of the Ig state maydeallocate or writeback its copy of the memory block withoutnotification to the cache holding the address tag of the memory block inthe Ig state. In such cases, the “stale” Ig state, which incorrectlyindicates that a global operation should be issued instead of a localoperation, will not cause any coherency errors, but will merely causesome operations, which could otherwise be serviced utilizing a localoperation, to be issued as global operations. Occurrences of suchinefficiencies will be limited in duration by the eventual replacementof the “stale” Ig cache entries.

Several rules govern the selection and replacement of Ig cache entries,for example, at block 1804 of FIG. 18, block 1960 of FIG. 19 and block2040 of FIG. 20. First, if a cache selects an Ig entry as the victim forreplacement, a castout of the Ig entry is performed (unlike the casewhen an I entry is selected). Second, if a request that causes a memoryblock to be loaded into a cache hits on an Ig cache entry in that samecache, the cache treats the Ig hit as a cache miss and performs acastout operation with the an Ig entry as the selected victim. The cachethus avoids avoid placing two copies of the same address tag in thecache directory. Third, the castout of the Ig state is preferablyperformed as a local operation, or if performed as a global operation,ignored by the LPC of the castout address. If an Ig entry is permittedto form in a cache that is not within the same coherency domain as theLPC for the memory block, no update to the domain indicator in the LPCis required. Fourth, the castout of the Ig state is preferably performedas a dataless address-only operation in which the domain indicator iswritten back to the LPC (if local to the cache performing the castout).

Implementation of an Ig state in accordance with the present inventionimproves communication efficiency by maintaining a cached domainindicator for a memory block in a coherency domain even when no validcopy of the memory block remains cached in the coherency domain. As aconsequence, an HPC for a memory block can service an exclusive accessrequest (e.g., a bus RWITM or bus DClaim operation) from a remotecoherency domain without retrying the request and performing a push ofthe requested memory block to the LPC.

With the implementation of the Ig state, CPU and I/O operations can beimplemented as described above with reference to FIGS. 18-22 and 9 b,given the rules governing selection and replacement of Ig entries notedabove. In addition, the implementation of the Ig state does not affectthe global bus read operation (FIG. 32), local and global bus DCBZoperations (FIGS. 27 and 36), local and global bus write operations(FIGS. 38 and 37) and bus partial write operation (FIG. 41) describedabove, given the understanding that updates to the coherency states ofvalid affirming snoopers (i.e., those snoopers holding the requestedmemory block in a valid state) to the I coherency state do not affect Igsnoopers, which by definition do not hold a valid copy of the requestedmemory block. High level logical flowcharts of cache and bus operationsmodified by the implementation of the Ig cache state are illustrated inFIGS. 44-48 and described in detail below.

Referring first to FIG. 44, a high level logical flowchart of anexemplary cache castout operation for a data processing systemimplementing coherency domains, domain indicators and the Ig cache stateis depicted. In such embodiments, the process given in FIG. 44 isperformed in lieu of that illustrated in FIG. 23.

The illustrated process begins at block 4400 when an L2 cache 230determines that a castout of a cache line is needed, for example, atblock 1804 of FIG. 18, block 1970 of FIG. 19 or block 2042 of FIG. 20.In the present embodiment, a cache castout operation is required if thevictim memory block selected for replacement is in any of the M, T, Teor Ig coherency states. To perform the castout operation, the L2 cache230 first determines at block 4402 whether or not the victim entryselected for replacement from the target congruence class is in the Igstate. If so, an address-only local bus castout operation is issued atblock 4412 and, if necessary, retried (as indicated by block 4414) inorder to update the corresponding domain indicator in the LPC systemmemory 108 to indicate “global.” As noted above, the castout of the Igentry is preferably performed only as a local operation, meaning that ifthe LPC system memory 108 is not within the local coherency domain, theCR does not indicate “retry local” at block 4414. Thereafter, the cachecastout operation ends at block 4424.

Returning to block 4402, if the victim entry selected for replacement isnot in the Ig state, the L2 cache 230 determines at block 4404 whetherto issue a global or local bus castout operation for the selected memoryblock. If L2 cache 230 elects to issue a global bus castout operation,the process passes to block 4420, which is described below. If, however,L2 cache 230 elects to issue a local bus castout operation, the processproceeds to block 4406, which illustrates the L2 cache 230 issuing alocal bus castout operation, as described above with reference to FIG.39, and then awaiting the associated CR. As indicated at block 4408, ifthe CR indicates “retry local”, meaning that the local bus writeoperation can definitely be serviced within the local coherency domainif retried, L2 cache 230 reissues the local bus castout operation atblock 4406. Alternatively, if L2 cache 230 receives a CR indicatingdefinitively that the bus write operation cannot be serviced within thelocal coherency domain (block 4410), the process proceeds to block 4420,which is described below. Finally, if L2 cache 230 receives a CRindicating that the castout of the selected memory block succeeded, theprocess simply ends at block 4424.

Block 4420 depicts L2 cache 230 issuing a global bus castout operationon system interconnect 110 via local interconnect 114, as describedabove with reference to FIG. 40. As indicated at block 4422, the L2cache 230 reissues the global bus castout operation until a CR otherthan “retry” is received. Thereafter, the process ends at block 4424.

With reference now to FIG. 45, there is illustrated a high level logicalflowchart of an exemplary method of performing a local bus readoperation in a data processing system implementing coherency domains,domain indicators and the Ig state in accordance with the presentinvention. As indicated by like reference numerals, the illustratedprocess is identical to that described above with reference to FIG. 31,except for blocks 4524 and block 4544, which are now described.

Block 4524 depicts a scenario in which the snooper 236 of an L2 cache230 provides a partial response affirming the local bus read operationand indicating that the L2 cache 230 holds the address tag of therequested memory block in the Ig state. If no M, Me, T, Te or Sr′snooper 236 is possibly hidden by an incomplete partial response (block3132), distributed response logic 210 provides a “go global” CR, asdepicted at block 3164. If, on the other hand, an Ig snooper 236 affirmsthe local bus read operation and the complex of partial responsesindicates an M, Me, T, Te or Sr′ snooper 236 is possibly hidden,response logic 210 generates a “retry” CR, as depicted at block 3142.

Block 4544 is a decision block indicating that if no M, Me, T, Te, Sr′or Ig snooper 236 affirms the local bus read operation, an LPC snooper122 affirms the local bus read operation, and a M, Me, T, Te or Igsnooper 236 is possibly hidden, response logic 210 generates a “retry”CR at block 3142. Response logic 210 generates a “retry” CR at block3142 because the bus read operation, if reissued as a local operation,may be able to be serviced without resorting to a global broadcast.

Referring now to FIG. 46, there is depicted a high level logicalflowchart of an exemplary method of performing a local bus RWITMoperation in a data processing system implementing coherency domains,domain indicators and the Ig state in accordance with the presentinvention. As indicated by like reference numerals, the illustratedprocess is identical to that described above with reference to FIG. 33,except for blocks 4624 and block 4644, which are now described.

Block 4624 represents the differences in handling the local bus RWITMoperation depending upon whether a snooper 236 of an L2 cache 230provides a partial response affirming the local bus RWITM operation andindicating that the L2 cache 230 holds the address tag of the requestedmemory block in the Ig state. If so, any affirming snooper 236 otherthan the Ig snooper 236 invalidates the relevant cache entry (block3332). If no M, Me, T, or Te snooper 236 is possibly hidden by anincomplete partial response (block 3334), distributed response logic 210provides a “go global” CR, as depicted at block 3336. If, on the otherhand, an Ig snooper 236 affirms the local bus RWITM operation and thecomplex of partial responses indicates an M, Me, T, or Te snooper 236 ispossibly hidden, response logic 210 generates a “retry” CR, as depictedat block 3338. Thus, the affirmance of the local bus RWITM operation byan Ig snooper 236 will cause the operation to be reissued as a globaloperation if no HPC is possibly hidden in the local coherency domain.

If an Ig snooper 236 does not affirm the local bus RWITM operation atblock 4624, the local bus RWITM operation is handled in accordance withblock 3330 and following blocks, which, except for block 4644, have beendescribed in detail above. Block 4644 is a decision block indicatingthat if no M, Me, T, Te or Ig snooper 236 affirms the local bus readoperation, an LPC snooper 122 affirms the local bus read operation, anda M, Me, T, Te or Ig snooper 236 is possibly hidden, each validaffirming snooper 236 (i.e., not an Ig snooper 236) invalidates its copyof the requested memory block, at block 3342, and response logic 210generates a “retry” CR at block 3338. Response logic 210 generates a“retry” CR at block 3338 because the bus RWITM operation, if reissued asa local operation, may be able to be serviced without resorting to aglobal broadcast.

With reference now to FIG. 47, there is illustrated a high level logicalflowchart of an exemplary method of performing a global bus RWITMoperation in a data processing system implementing coherency domains,domain indicators and the Ig state in accordance with the presentinvention. As indicated by like reference numbers, the illustratedprocess is the same as that described above with reference to FIG. 34,except for the cases in which an HPC (e.g., M, Me, T or Te) snooper 236affirms the global bus RWITM operation.

As shown, the process begins at block 3400 in response to the master 232of a requesting L2 cache 230 issuing a global bus RWITM operation, forexample, at block 1954 of FIG. 19. If a snooper 236 affirms the globalbus RWITM operation with a partial response indicating that the L2 cache230 containing the snooper 236 holds the requested memory block in the Mor Me state as shown at block 4702, the M or Me snooper 236 providesearly data to the requesting master 232, which then holds the requestedmemory block in the M state (block 4704 or block 4706). Response logic210 generates a CR indicating “success”, as shown at block 3407. Inaddition, the M or Me snooper 236 updates its cache state to either I orIg depending upon whether or not it is local to (i.e., in the samecoherency domain as) the requesting master 232 (block 4702). If the M orMe snooper 236 determines it belongs to the same coherency domain as therequesting master 232, for example, by reference to the scope indicatorin the bus operation, the M or Me snooper 236 updates its cache statefor the requested memory block to I. On the other hand, if the M or Mesnooper 236 determines it does not belong to the same coherency domainas the requesting master 232, the M or Me snooper 236 updates its cachestate for the requested memory block to the Ig state in order tomaintain a cached domain indicator for the requested memory block in itscoherency domain. Consequently, no retry-push is required in response tothe global bus RWITM operation in order to update the domain indicator3004 in the LPC system memory 108.

Turning now to block 3410, if a snooper 236 affirms the global bus RWITMoperation with a partial response indicating that the L2 cache 230containing the snooper 236 holds the requested memory block in eitherthe T or Te state, the process passes to block 3412, which representsthe T or Te snooper 236 determining whether or not it is local to therequesting master 232. If so, the global bus RWITM operation is handledin accordance with blocks 3418 and following blocks, which are describedin detail above. If, however, the T or Te snooper 236 affirming theglobal bus RWITM operation determines that it is not local to therequesting master 232, the global bus RWITM operation is serviced inaccordance with either block 4715 or block 4716, depending upon whetheror not an Sr′ snooper 236 affirmed the global bus RWITM operation.

As shown at blocks 4715, if an Sr′ snooper 236 affirmed the global busRWITM operation, the Sr′ snooper 236 provides early data to therequesting master 232, and the T or Te snooper 236 that affirmed theglobal bus RWITM operation updates its cache state for the entrycontaining the requested memory block to Ig. In response to receipt ofthe requested memory block, the requesting L2 cache 230 holds therequested memory block in the M state. In addition, any valid affirmingsnooper 236 (i.e., not an Ig snooper 236) other than the T or Te snooper236 updates its respective cache state for the requested memory block toI. Alternatively, as depicted at block 4716, if an Sr′ snooper 236 doesnot affirm the global bus RWITM operation, the T or Te snooper 236provides late data in response to receipt of a CR indicating “success”(block 3407). In response to receipt of the requested memory block, therequesting L2 cache 230 holds the requested memory block in the M state.In addition, the T or Te snooper 236 updates its cache state to Ig, andany other valid affirming snooper 236 updates its respective cache statefor the requested memory block to I. Thus, if a remote T or Te snooper236 affirms the global bus RWITM operation, the affirming T or Tesnooper 236 enters the Ig state in order to maintain a cached domainindicator for the requested memory block in its coherency domain.Consequently, no retry-push is required in response to the global busRWITM operation in order to update the domain indicator 3004 in the LPCsystem memory 108.

In either of the cases represented by block 4715 or block 4716, responselogic 210 generates a CR dependent upon whether an S′ or Sr′ snooper 236is possibly hidden and thus unable to invalidate its copy of therequested memory block in response to snooping the global bus RWITMoperation. If response logic 210 makes a determination at block 3424based upon the partial responses to the bus RWITM operation that an S′or Sr′ snooper 236 is possibly hidden, response logic 210 generates a CRindicating “cleanup”, as shown at block 3426. Alternatively, if responselogic 210 determines that no S′ or Sr′ snooper 236 is possibly hidden,response logic 210 generates a CR indicating “success”, as depicted atblock 3407.

Referring now to FIG. 48, there is depicted a high level logicalflowchart of an exemplary method of performing a global bus DClaimoperation in a data processing system implementing coherency domains,domain indicators and the Ig state in accordance with the presentinvention. As indicated by like reference numbers, the illustratedprocess is the same as that described above with reference to FIG. 35,except for the case in which a T or Te snooper 236 affirms the globalbus DClaim operation (block 3510) that is not within the same coherencydomain as the requesting master 232 (block 3512).

In particular, rather than performing a retry-push as depicted in FIG.35 at blocks 3514, 3505 and 3506 in order to update the domain indicator3004 at the LPC system memory 108, the T or Te snooper 236 simplyupdates the state of its relevant entry to Ig to maintain a cacheddomain indicator for the requested memory block as shown at block 4814.In addition, the requesting master 232 updates the coherency state ofits copy of the requested memory block to M, and each valid affirmingsnooper 236 other than the T or Te snooper 236 updates its coherencystate for the requested memory block to I (block 4814). As shown atblocks 3518, 3520 and 3522, if the partial responses indicate that no S′or Sr′ snooper 236 is possibly hidden, the process ends with distributedresponse logic 210 generating a CR indicating “success” (block 3522).If, on the other hand, at least one partial response indicating thepresence of a possibly hidden S′ or Sr′ snooper 236 was given inresponse to the global bus DClaim operation, distributed response logic210 generates a CR indicating “cleanup” (block 3520), meaning that therequesting L2 cache 230 must issue one or more bus kill operations toinvalidate the requested memory block in any such hidden S′ or Sr′snooper 236.

With reference now to FIG. 49, there is illustrated a high level logicalflowchart of an exemplary method of performing a global bus killoperation in a data processing system implementing coherency domains,domain indicators and the Ig state in accordance with the presentinvention. As indicated by like reference numbers, the illustratedprocess is the same as that described above with reference to FIG. 14,except for the operations performed by an affirming Ig snooper 236.

In particular, as depicted at blocks 4902 and 4904, while each snooper236 affirming the bus kill operation in any of the M, Me, T, Te, Sr′ orS′ states invalidates its copy of the requested memory block by assumingthe I state, an affirming Ig snooper 236, if any, remains in the Igstate. No change of state to the I state is required because the Igstate indicates the associated data is already invalid.

Referring now to FIGS. 50 and 51, there are depicted high level logicalflowcharts of exemplary methods of performing local and global buscastout operations, respectively, in a data processing systemimplementing coherency domains, domain indicators and the Ig state inaccordance with the present invention. The depicted processes areidentical to those described above with respect to FIGS. 39 and 40,respectively, except for the case in which the requesting L2 cache 230holds the memory block in the Ig state. As indicated at block 5028 ofFIG. 50 and block 5128 of FIG. 51, if an LPC snooper 122 affirms acastout operation of a requesting Ig cache 230, the requesting Ig cache230 updates the state of the relevant entry to I and performs a datalessaddress-only castout operation to cause the LPC snooper 122 to updatethe corresponding domain indicator 3004 to indicate “global”. No data iswritten back to the LPC snooper 122 by the requesting Ig cache 230because the requesting Ig cache 230 does not hold a valid copy of thememory block corresponding to the address tag associated with the Igstate. As illustrated at block 3926 or 4026, response logic 210generates a CR indicating “success” if an LPC snooper 122 affirms thecastout operation at block 3920 or 4020.

VII. Castout Collisions

In conventional data processing systems, performing a bus castoutoperation will not result in an address collision between operationsbecause, absent an error condition, only one cache is responsible forcasting out a modified memory block to system memory. However, when abus castout operation is performed in a data processing systemimplementing the Ig cache state as depicted in FIGS. 50 and 51, it ispossible for multiple caches to independently castout Ig cache entrieshaving the same address in order to notify the memory controller toupdate the domain indicator in the associated system memory. It is alsopossible for one cache to perform a castout of an Ig entry while anothercache holding a memory block associated with that same address in one ofthe M, .Me, T or Te state performs a castout of the memory block. Whenmultiple chronologically overlapping castout operations having the sametarget address are received by a memory controller a “castout collision”is said to result. As described in greater detail below with referenceto FIGS. 52 and 53, the present invention not only handles castoutcollisions correctly so that no errors result in the setting of thedomain indicators in system memory, but also advantageous discardsand/or merges bus castout operations to obtain greater utilization ofthe bandwidth of local and system interconnects 114, 110 and theresources of memory controllers 106.

With reference now to FIG. 52, there is illustrated a more detailedblock diagram of a memory controller 106 in accordance with the presentinvention. As shown, memory controller 106 includes write circuitry 5201that services operations that update the associated system memory 108,read circuitry 5203 that services read-type operations targeting theassociated system memory 108, and dispatch control logic 5200 thatsnoops bus operations and dispatches selected operations to writecircuitry 5201 and read circuitry 5203. Write circuitry 5201 includesn+1 write queues (WrQs) 5202 a-5202 n, each having a respective one ofaddress comparators 5204 a-5204 n and write queue controllers 5206a-5206 n. The output of each write queue 5202 is coupled to an input ofan n+1:1 multiplexer 5210, the output of which is coupled to theassociated system memory 108.

Referring now to FIG. 53, there is depicted a high level block diagramof an exemplary method by which a memory controller 106 as depicted inFIG. 52 handles castout collisions in accordance with a preferredembodiment of the present invention. The process begins at block 5300 inresponse to receipt of bus castout operation and then proceeds to block5302, which illustrates a determination by dispatch control logic 5200of whether or not the memory controller 106 serves as the LPC for theaddress specified by the bus castout operation. As will be appreciated,the determination made at block 5302 may be made utilizing a variety ofconventional techniques, including comparison of the castout address torange registers and/or hashing the castout address. If dispatch controllogic 5200 determines that the memory controller 106 is not the LPC forthe castout address, dispatch control logic 5200 provides a “null”partial response at block 5304 to indicate that memory controller 106 isnot the LPC for the castout address. Thereafter, the process ends atblock 5306.

If, on the other hand, dispatch control logic 5200 determines thatmemory controller 106 is the LPC for the castout address, dispatchcontrol logic 5200 provides a partial response acknowledging the buscastout operation, as depicted at block 5305. As illustrated at block5308, dispatch control logic 5200 further determines whether the buscastout operation is a global bus castout operation of a cache entry inthe Ig state that was initiated by an L2 cache 230 in a differentcoherency domain than memory controller 106. The determination depictedat block 5308 can be made, for example, by reference to the transactiontype and scope indicator contained in the bus castout operation. Becauseno update is made to a domain indicator in system memory 108 in responseto a castout of an Ig cache entry from a remote coherency domain, if anaffirmative determination is made at block 5308, dispatch control logic5200 does not allocate one of write queues 5202 to service the globalbus castout operation. The process then ends at block 5306.

In response to a determination at block 5308 that the bus castoutoperation received at block 5300 is not a global bus castout of an Igcache entry by an L2 cache 230 in a remote coherency domain, dispatchcontrol logic 5200 allocates a one of write queues 5202 (hereafter,assumed to be write queue 5202 a) to service the castout operation andactivates a load enable (e.g., Load_queue0) to load the castout address(and associated “global” domain indicator if an Ig castout operation)into write queue 5202 a (block 5310). As depicted at block 5312, writequeue controller 5206 a associated with the write queue 5202 a thenawaits receipt of the CR for the bus castout operation and the castoutmemory block, if any. While awaiting receipt of the CR and castoutmemory block (if any), write queue controller 5206 a monitors its localinterconnect 114 for an address collision between the queued bus castoutoperation and subsequently snooped operations, as indicated by the loopbetween block 5312 and block 5330. Write queue controller 5206 a detectsan address collision in response to receipt of a signal from itsassociated address comparator 5204 a that indicates that the address ofa snooped operation matches the castout address specified by the queuedbus castout operation.

If no address collision is detected at block 5330 before the CR for thebus castout operation and castout memory block (if any) is received, theprocess proceeds from block 5312 to block 5314. Block 5314 depicts adetermination by write queue controller 5206 a of whether or not the CRfor the bus castout operation indicates “retry”. If so, write queuecontroller 5206 a discards the queued bus castout operation, anddispatch control logic 5200 reallocates write queue 5202 a to asubsequent operation. Thereafter, the process terminates at block 5306.

Alternatively, in response to a determination at block 5314 that the CRfor the bus castout operation indicates “success” rather than “retry”,write queue controller 5206 a places the castout memory block, if any,within write queue 5202 a. As illustrated at block 5320, write queuecontroller 5206 a arbitrates for access to the associated system memory108, and once access permission is obtained, transmits the castoutoperation from its write queue 5202 a to system memory 108. Intransmitting the castout operation, the castout memory block, if any,contained in write queue 5202 a overwrites the corresponding memoryblock in system memory 108 and the domain indicator, if any, containedwithin write queue 5202 a overwrites the associated domain indicator insystem memory 108. The process then terminates at block 5306.

If an address collision between a snooped operation and the queued buscastout operation is detected at block 5330 before the CR for the buscastout operation is received, the castout collision is handled inaccordance with block 5332 and following blocks. That is, if, followingthe detection of the address collision, the queued bus castout operationreceives a CR indicating “retry”, as depicted at block 5332, write queuecontroller 5202 a discards the contents of write queue 5202 a. Theprocess then ends at block 5306, and memory controller 106 handles thesnooped operation that collided with the bus castout operationseparately. On the other hand, assuming a CR indicating “success” forthe queued bus castout operation, memory controller 106 manages theaddress collision in a manner dependent upon the transaction types ofthe queued bus castout operation and the snooped operation.

For example, if both the queued bus castout operation and the snoopedoperation are castouts of Ig cache entries having the same address(blocks 5334 and 5336), dispatch control logic 5200 provides a partialresponse acknowledging the second Ig bus castout operation, but does notallocate it a write queue 5202, as illustrated at block 5338. As will beappreciated, no write queue 5202 is allocated to the second Ig castoutoperation because it is redundant in view of the already queued buscastout operation. The process thereafter passes to block 5320, which,as has been described, depicts performing an update to the domainindicator in system memory 108 for the specified castout address.Thereafter, the process ends at block 5306. Returning to block 5334, ifthe queued bus castout operation is not a castout of an Ig cache entryand is instead a castout of a valid memory block and the snoopedoperation is another castout of the same memory block (block 5340), anerror causing processing to halt occurs, as shown at block 5342, becauseeach memory block can have only one HPC.

Referring again to blocks 5334 and 5340, if the queued bus castoutoperation is a castout of a valid memory block and the snooped operationis a castout of an Ig cache entry, dispatch control logic 5200 providesa partial response acknowledging the Ig castout operation, as depictedat block 5352. However, as further indicated at block 5352, dispatchcontrol logic 5200 preferably does not allocate a write queue 5202 tothe Ig castout operation. Instead, dispatch control logic 5200 mergesthe “global” domain indicator provided by the snooped Ig castoutoperation with the address and associated memory block of the queued buscastout operation that are contained in the previously allocated writequeue 5202 a. Thereafter, the process passes to blocks 5320 and 5306,which have been described.

Referring again to blocks 5334, 5336 and 5350, if the queued bus castoutoperation is an Ig castout operation, and the snooped operation is acastout of a valid memory block, dispatch control logic 5200 provides apartial response acknowledging the snooped castout operation, asdepicted at block 5352. In addition, dispatch control logic 5200advantageously merges the castout memory block into write queue 5202 acontaining the “global” domain indicator and address of the queued Igcastout operation, rather than allocating the snooped castout operationa separate write queue 5202. Thereafter, the process passes to blocks5320 and 5306, which have been described.

Referring again to block 5350, a write queue controller 5206 mayoptionally be further optimized to snoop a queued Ig castout operationnot only against other bus castout operations, but also against busread-type (e.g., read or RWITM) operations. In particular, as shown atblock 5354, in response to detecting an address collision between aqueued Ig castout operation and a bus read-type operation, write queuecontroller 5206 a can discard the queued Ig castout operation ifresponse logic 210 provides a CR for the snooped bus read-type operationindicating that the system memory 108 is the source for the requestedmemory block. The Ig castout operation can safely be discarded becausethe bus read-type operation, when serviced by read circuitry 5203, will,if necessary, update the domain indicator in system memory 108 to“global”. Following block 5354, the process depicted in FIG. 53 ends atblock 5306.

As has been described, the present invention optimizes the handling ofbus castout operations to improve utilization of the bandwidth of localand system interconnects 114, 110 and the resources of memorycontrollers 106. For example, rather than retrying a subsequentoperation that collides with a queued castout operation as isconventional, the present invention advantageously permits snoopedcastout operations that collide with already queued castout operationsto be discarded or merged with the queued castout operations. Inaddition, in at least one embodiment the present invention furtherpermits a queued bus castout operation to be discarded in favor of asubsequently snooped operation, such as a read-type operationoriginating from a remote coherency domain.

VIII. T States Providing a Domain Indication

It will be recalled from the foregoing discussion with reference toTable II that the exemplary coherency states utilized herein areindicative of a number of properties regarding the associated memoryblock, including (1) whether the cache holding the memory block is theHPC for the memory block, (2) whether the memory block is the solecached copy system wide, (3) whether the cache can source the memoryblock to another cache by intervention, and (4) whether the memory blockis consistent with the corresponding memory block in system memory.

As demonstrated by the Ig coherency state described above, coherencystates may further indicate whether another cache in a remote coherencydomain (possibly) holds a cache entry having a matching address. Thisadditional information may also be expressed by one or more additionalcoherency states associated with valid memory blocks that are possiblyshared. For example, in at least one embodiment of the presentinvention, the T and Te coherency states may be selectively designatedwith the notation “n” (i.e., Tn and Ten), where “n” means that theassociated valid memory block is known to not be cached outside of thecoherency domain containing the cache holding the memory block. Anexemplary set of coherency states including the Tn and Ten coherencystates may thus be summarized as shown below in Table IV. TABLE IV CacheConsistent Cached outside Legal concurrent state HPC? Unique? Datasource? with LPC? local domain? states M yes yes yes, before CR no no I,Ig (& LPC) Me yes yes yes, before CR yes no I, Ig (& LPC) T yes unknownyes, after CR no unknown Sr, S, I, Ig (& LPC) if none provided before CRTn yes unknown yes, after CR no no Sr, S, I, Ig (& LPC) if none providedbefore CR Te yes unknown yes, after CR yes unknown Sr, S, I, Ig (& LPC)if none provided before CR Ten yes unknown yes, after CR yes no Sr, S,I, Ig (& LPC) if none provided before CR Sr no unknown yes, before CRunknown unknown T, Tn, Te, Ten, S, I, Ig (& LPC) S no unknown no unknownunknown T, Tn, Te, Ten, Sr, S, I, Ig (& LPC) I no n/a no n/a unknown M,Me, T, Tn, Te, Ten, Sr, S, I, Ig (& LPC) Ig no n/a no n/a Assumed so, inM, Me, T, Tn, Te, Ten, absence of other Sr, S, I, Ig (& LPC) information

As will become apparent from the following description of CPU, cache andbus operations in an exemplary data processing system 100,implementation of the exemplary set of coherency states summarized inTable IV, and in particular, the Tn and Ten coherency states, permits anadvantageous reduction in the broadcast scope of certain bus operations,including bus kill operations.

A. CPU I/O and Cache Operations

With the implementation of the Tn and Ten coherency states, the I/O readand I/O partial write operations are preferably implemented in themanner described above with reference to FIGS. 21 and 9B, respectively.Cache castout operations are preferably implemented as described abovewith respect to FIG. 44, except that victim memory blocks in the Tncoherency state are (like victim memory blocks in the M, T, Te and Igstates) preferably replaced utilizing cache castout operations. Castoutsof victim memory blocks in the Tn state update both the correspondingdata and domain indicator in the LPC system memory 108. Theimplementation of Tn and Ten coherency states supports enhancements tothe CPU read, CPU update, CPU write and I/O write operations, asdepicted in FIGS. 54, 55A-55B, 56A-56B, and 57, respectively, and asdescribed below.

With reference now to FIG. 54, there is depicted a high level logicalflowchart of an exemplary method of servicing a processor read operationin a data processing system implementing Tn and Ten coherency states inaccordance with the present invention. As indicated by like referencenumerals, the illustrated method is substantially identical to thatdepicted in FIG. 18. The one difference (signified by the use of primenotation) is found at block 1802′, which indicates that a cache holdinga requested memory block in any of the T, Te, Tn or Ten states(collectively represented by the designation Tx), can service a CPU readoperation of one of the processor cores 200 in the same processing unit104 by supplying the requested memory block to the processor core 200,as depicted at block 1824.

Referring now to FIG. 55A-55B, there is illustrated a high level logicalflowchart of an exemplary method of servicing a processor updateoperation in a data processing system implementing Tn and Ten coherencystates in accordance with preferred embodiments of the presentinvention. As indicated by the use of like reference numerals, theprocess is substantially similar to that described above with referenceto FIG. 19.

As depicted, the process begins at block 1900 in response to receipt byan L2 cache 230 of an update request by an associated one of theprocessor cores 200 within the same processing unit 104. In response tothe receipt of the update request, master 232 of the L2 cache 230accesses L2 cache directory 302 to determine if the memory blockreferenced by the request address specified by the update request iscached within L2 cache 230 in M state, as shown at block 1902. If so,the master 232 updates the memory block in L2 cache 232 within the newdata supplied by the processor core 200, as illustrated at block 1904.Thereafter, the update process ends at block 1906.

As shown at blocks 1910-1912, if L2 cache directory 302 insteadindicates that L2 cache 230 holds the specified memory block in the Mestate, master 232 updates the state field 306 for the requested memoryblock to M state in addition to updating the memory block as shown atblock 1904. Thereafter, the process terminates at block 1906.

Following page connector G to FIG. 55B, if L2 cache directory 302indicates that L2 cache 230 holds the requested memory block in eitherof the T or Te states (block 1920), meaning that the L2 cache 230 is theHPC for the requested memory block and the requested memory block maypossibly be held in one or more other L2 caches 230, master 232 mustgain exclusive access to the requested memory block in order to performthe requested update to the memory block. The process by which master232 gains exclusive access to the requested memory block is shown atblock 1922 and following blocks.

According to this process, master 232 updates the state of the requestedmemory block in the associated state field 306 of L2 cache directory 302to the M state, as depicted at block 1922. This upgrade is cache stateis permissible without first informing other L2 caches 230 because, asthe HPC, the L2 cache 230 has the authority to award itself exclusiveaccess to the requested memory block. As illustrated at block 1924, thesnooper 236 of the L2 cache 230 provides “downgrade” partial responsesto competing DClaim operations snooped on its local interconnect 114, ifany, by which other masters are seeking ownership of the requestedmemory block. These partial responses indicate that the other requestersmust reissue any such competing operations as bus RWITM operations. Inaddition, as depicted at block 1926, master 232 issues a bus killoperation on interconnects 110, 114 to invalidate any other cachedcopies of the memory block, as described below with reference to FIG.65.

Master 232 next determines at blocks 5500 and 1928 whether or not the CRfor the bus kill operation indicates that the bus kill operationsuccessfully invalidated all other cached copies of the requested memoryblock or whether additional local or global “cleanup” (i.e.,invalidation of other cached copies) is required. If the CR indicatesthat additional cleanup is not required, the process proceeds throughpage connector I to block 1904 of FIG. 55A, which has been described. Ifthe CR indicates that additional cleanup is required, master 232additionally determines whether the CR indicates that the other cachedcopy or copies of the requested memory block reside entirely within itslocal coherency domain (block 5500) or whether at least one copy of therequested memory block is cached outside the local coherency domain ofmaster 232 (block 1928). If the CR indicates that each remaining cachedcopy of the requested memory block resides in the local coherency domainof master 232, the snooper 236 of the requesting L2 cache 230 continuesto downgrade active bus DClaim operations (block 5506), and the master232 of the requesting L2 cache 230 continues to issue local bus killoperation (block 5508) limited in scope to the local coherency domain ofmaster 232 until all other cached copies of the memory block areinvalidated. If the CR indicates that at least one remaining cached copyof the requested memory block resides in a remote coherency domain, theprocess returns to block 1924, which has been described.

With reference now to block 5502, if the access to the L2 cachedirectory 302 indicates that the requested memory block is held in oneof the Tn or Ten states, then master 232 knows that the requesting L2cache 230 is the HPC for the requested memory block and that any othercached copy of the requested memory block is held by a cache in itslocal coherency domain. Accordingly, master 232 updates the state of therequested memory block in the associated state field 306 of L2 cachedirectory 302 to the M state, as depicted at block 5504. In addition,the snooper 236 of the requesting L2 cache 230 provides “downgrade”partial responses to any competing DClaim operations snooped on itslocal interconnect 114 (block 5506), and the master 232 of therequesting L2 cache 230 continues to issue local bus kill operation(block 5508) limited in scope to the local coherency domain of master232 until any other cached copies of the memory block are invalidated.If the master 232 determines by reference to the CR for a local bus killoperation that no further local cleanup is required (block 5500), theprocess passes through block 1928 and page connector I to block 1904,which has been described.

Referring now to block 1930 of FIG. 55A, if the access to L2 cachedirectory 302 indicates that the requested memory block is held in theSr or S states, the requesting L2 cache 230 is not the HPC for therequested memory block, and master 232 must gain ownership of therequested memory block from the HPC, if any, or in the absence of anHPC, the LPC, prior to updating the memory block.

Accordingly, master 232 first determines at block 1931 whether to issuea bus DClaim operation as a local or global operation. If master 232makes a determination to issue a global bus DClaim operation, theprocess proceeds to block 1940, which is described below. In response toa determination at block 1931 to issue a bus DClaim operation as a localoperation, master 232 issues a local bus DClaim operation at block 1932,as described below in greater detail with reference to FIG. 62. Master232 then awaits receipt of the CR of the local bus DClaim operation,which is represented by the collection of decision blocks 1934, 1936 and1938. If the CR indicates “retry” (block 1934), the process returns toblock 1931, which has been described. If the CR alternatively indicatesdefinitively that the bus DClaim operation cannot be serviced with thelocal coherency domain (block 1936), the process proceeds to block 1940,which is described below. If the CR alternatively indicates “downgrade”,meaning that another requestor has obtained ownership of the requestedmemory block via a bus DClaim operation, the process passes to block1948, which is described below. If the CR alternatively indicates thatmaster 232 has been awarded ownership of the requested memory block bythe HPC based upon the local bus DClaim operation, the process passesthrough page connector J to block 5500 of FIG. 55B and following blocks,which have been described.

Block 1940 depicts master 232 issuing a global bus DClaim operation, asdescribed below with respect to FIG. 63. Master 232 next determines atblocks 1942-1944 whether or not the CR for the global bus DClaimoperation indicates that it succeeded, should be retried, or was“downgraded” to a RWITM operation. If the CR indicates that the busDClaim operation should be retried (block 1942), master 232 reissues aglobal bus DClaim operation at block 1940 and continues to do so until aCR other than “retry” is received. If the CR is received indicating thatthe global bus DClaim operation has been downgraded in response toanother requestor successfully issuing a bus DClaim operation targetingthe requested memory block, the process proceeds to block 1946, which isdescribed below. If the CR alternatively indicates that master 232 hasbeen awarded ownership of the requested memory block by the HPC basedupon the global bus DClaim operation, the process passes through pageconnector J to block 5500 of FIG. 55B and following blocks, which havebeen described.

Block 1946 depicts master 232 of the requesting L2 cache 230 determiningwhether or not to issue a bus RWITM operation as a local or globaloperation. If master 232 elects to issue a global RWITM operation, theprocess passes to block 1954, which is described below. If, however,master 232 elects to issue a local bus RWITM operation, the processproceeds to block 1948, which illustrates master 232 issuing a local busRWITM operation and awaiting the associated CR. As indicated at block1950, if the CR indicates “retry”, the process returns to block 1946,which represents master 232 again determining whether to issue a localor global RWITM operation utilizing the additional information, if any,provided in the retry CR. If the CR to the local bus RWTIM operationissued at block 1948 does not indicate “retry” (block 1950) but insteadindicates that the bus RWITM operation was successful in obtainingownership of the requested memory block (block 1952), the process passesthrough page connect J to block 5500 of FIG. 55B, which has beendescribed. If master 232 determines at block 1952 that the CR to thelocal bus RWITM operation indicates that the operation cannot beserviced within the local coherency domain, the process passes to block1954 and following blocks.

Blocks 1954 and 1956 depict master 232 iteratively issuing a global busRWITM operation for the requested memory block, as described below withreference to FIGS. 61A-61B, until a CR other than “retry” is received.In response to master 232 receiving a non-retry CR indicating that itsucceeded in obtaining ownership of the requested memory block (block1956), the process passes through page connector J to block 5500 andfollowing blocks, which have been described.

With reference now to block 1960, if a negative determination has beenmade at blocks 1902, 1910, 1920, 5502 and 1930, L2 cache 230 does nothold a valid copy of the requested memory block. Accordingly, asindicated at blocks 1960 and 1970, L2 cache 230 performs a cache castoutoperation if needed to allocate a cache line for the requested memoryblock. Thereafter, the process passes to block 1946 and following blocksas described above.

With reference now to FIGS. 56A-56B, there is depicted a high levellogical flowchart of an exemplary method of servicing a processor writeoperation in a data processing system implementing Tn and Ten coherencystates in accordance with preferred embodiments of the presentinvention. As indicated by the use of like reference numbers, theprocess given in FIGS. 56A-56B is substantially similar the processdepicted in FIG. 20 and described above.

The process begins at block 2000 in response to receipt by an L2 cache230 of a write request by an associated one of the processor cores 200within the same processing unit 104. In response to the receipt of thewrite request, master 232 of the L2 cache 230 accesses L2 cachedirectory 302 to determine if the memory block referenced by the requestaddress specified by the update request is cached within L2 cache 230 inM state, as shown at block 2002. If so, the master 232 writes the datasupplied by the processor core 200 into L2 cache array 300, asillustrated at block 2004. Thereafter, the process ends at block 2006.

As shown at blocks 2010-2012, if L2 cache directory 302 insteadindicates that L2 cache 230 holds the specified memory block in the Mestate, master 232 updates the state field 306 for the requested memoryblock to M state in addition to writing the memory block as shown atblock 2004. Thereafter, the process terminates at block 2006.

Passing through page connector K to block 2020 of FIG. 56B, if L2 cachedirectory 302 indicates that L2 cache 230 holds the requested memoryblock in either of the T or Te states, meaning that the L2 cache 230 isthe HPC for the requested memory block and the requested memory blockmay possibly be held in one or more other L2 caches 230, master 232 mustgain exclusive access to the requested memory block in order to performthe requested write to the memory block. The process by which master 232gains exclusive access to the requested memory block is shown at block2022 and following blocks.

According to this process, master 232 updates the state of the requestedmemory block in the associated state field 306 of L2 cache directory 302to the M state, as depicted at block 2022. As illustrated at block 724,the snooper 236 of the requesting L2 cache 230 provides “downgrade”partial responses to competing DClaim operations snooped on its localinterconnect 114 to attempt to force other requesters for the memoryblock to reissue any such competing requests as RWITM requests. Inaddition, as depicted at block 2026, master 232 issues a bus killoperation to invalidate any other cached copies of the memory block, asdescribed in detail below with reference to FIG. 65.

Master 232 next determines at blocks 5600 and 2028 whether or not the CRfor the bus kill operation indicates that the bus kill operationsuccessfully invalidated all other cached copies of the requested memoryblock or whether additional local or global “cleanup” (i.e.,invalidation of other cached copies) is required. If the CR indicatesthat additional cleanup is not required, the process proceeds throughpage connector N to block 2004 of FIG. 56A, which has been described. Ifthe CR indicates that additional cleanup is required, master 232additionally determines whether the CR indicates that the other cachedcopy or copies of the requested memory block reside entirely within itslocal coherency domain (block 5600) or whether at least one copy of therequested memory block is cached outside the local coherency domain ofmaster 232 (block 2028). If the CR indicates that each remaining cachedcopy of the requested memory block resides in the local coherency domainof master 232, the snooper 236 of the requesting L2 cache 230 continuesto downgrade active bus DClaim operations (block 5606), and the master232 of the requesting L2 cache 230 continues to issue local bus killoperation (block 5608) limited in scope to the local coherency domain ofmaster 232 until all other cached copies of the memory block areinvalidated. If the CR indicates that at least one remaining cached copyof the requested memory block resides in a remote coherency domain, theprocess returns to block 2024, which has been described.

With reference now to block 5602, if the access to the L2 cachedirectory 302 indicates that the requested memory block is held in oneof the Tn or Ten states, then master 232 knows that the requesting L2cache 230 is the HPC for the requested memory block and that any othercached copy of the requested memory block is held by another cache inits local coherency domain. Accordingly, master 232 updates the state ofthe requested memory block in the associated state field 306 of L2 cachedirectory 302 to the M state, as depicted at block 5604. In addition,the snooper 236 of the requesting L2 cache 230 provides “downgrade”partial responses to any competing DClaim operations snooped on itslocal interconnect 114 (block 5606), and the master 232 of therequesting L2 cache 230 continues to issue local bus kill operation(block 5608) limited in scope to the local coherency domain of master232 until any other cached copies of the memory block are invalidated.If the master 232 determines by reference to the CR for a local bus killoperation that no further local cleanup is required (block 5600), theprocess passes through block 2028 and page connector N to block 2004,which has been described.

Referring now to block 2030 of FIG. 56A, if the access to L2 cachedirectory 302 indicates that the requested memory block is held in theSr or S states, the requesting L2 cache 230 is not the HPC for therequested memory block, and master 232 must gain ownership of therequested memory block from the HPC, if any, or in the absence of anHPC, the LPC, prior to writing the memory block. Accordingly, master 232first determines at block 2050 whether to issue a bus DBCZ operation asa local or global operation.

If master 232 elects to issue a global bus DCBZ operation, the processpasses to block 2060, which is described below. If, however, master 232elects to issue a local bus DCBZ operation, the process proceeds toblock 2052, which illustrates master 232 issuing a local bus DCBZoperation, as described below with reference to FIG. 66, and thenawaiting the associated CR. As indicated at block 2054, if the CR forthe local bus DCBZ operation indicates “retry”, the process returns toblock 2050, which represents master 232 again determining whether toissue a local or global bus DCBZ operation utilizing the additionalinformation, if any, provided in the retry CR. If the CR to the localbus DCBZ operation issued at block 2052 does not indicate “retry” (block2054) but instead indicates that the bus RWITM operation was successfulin obtaining ownership of the requested memory block (block 2056), theprocess passes through page connector M to block 5600 of FIG. 56B, whichhas been described. If master 232 determines at block 2056 that the CRto the local bus DCBZ operation indicates that the operation cannot beserviced within the local coherency domain, the process passes to block2060 and following blocks.

Block 2060 illustrates master 232 issuing a global bus DCBZ operation,as described below with respect to FIG. 67. As shown at block 2062,master 232 reissues the global bus DCBZ operation at block 2060 until aCR other than “retry” is received. Following receipt of a CR to theglobal bus DCBZ operation other than “retry” at block 2062, the processpasses through page connector M to block 5600 of FIG. 56B and followingblocks, which have been described.

With reference now to block 2040, if a negative determination has beenmade at blocks 2002, 2010, 2020, 5602 and 2030, L2 cache 230 does nothold a valid copy of the requested memory block. Accordingly, asindicated at block 2040 and 2042, L2 cache 230 performs a cache castoutoperation if needed to allocate a cache line for the requested memoryblock. Thereafter, the process passes to block 2050 and followingblocks, which have been described.

Referring now to FIG. 57, there is depicted a high level logicalflowchart of an exemplary method of performing an I/O write operation ina data processing system implementing Tn and Ten coherency states inaccordance with a preferred embodiment of the present invention. Asindicated by like reference numerals, the process given in FIG. 57 issimilar to that illustrated in FIG. 22.

As shown, the process begins at block 2200 in response to receipt by theI/O controller 214 of a processing unit 104 of an I/O write request byan attached I/O device 216. In response to receipt of the I/O writerequest, I/O controller 214 determines at block 2202 whether or not toissue a global or local bus write operation to obtain the requestedmemory block.

If I/O controller 214 elects to issue a global bus write operation, theprocess passes to block 2220, which is described below. If, however, I/Ocontroller 214 elects to issue a local bus write operation, the processproceeds to block 2204, which illustrates I/O controller 214 issuing alocal bus write operation, as described below with reference to FIG. 70,and then awaiting the associated CR. As indicated at block 2206, if theCR indicates “retry local”, meaning that the local bus write operationcan definitely be serviced within the local coherency domain if retried,I/O controller 214 reissues the local bus write operation at block 2204.If I/O controller 214 receives a CR providing more equivocalinformation, for example, simply “retry” (block 2208), the processreturns block 2202, which has been described. Alternatively, if I/Ocontroller 214 receives a CR indicating definitively that the bus writeoperation cannot be serviced within the local coherency domain (block2210), the process proceeds to block 2220, which is described below.Finally, if I/O controller 214 receives a CR indicating that it has beenawarded ownership of the requested memory block, the process passes fromblock 2204 through blocks 2206, 2208 and 2210 to block 2224 andfollowing blocks, which illustrate I/O controller 214 performing cleanupoperations, if necessary, as described below.

Referring now to block 2220, I/O controller 214 issues a global buswrite operation, as described below with reference to FIG. 71. Asindicated at block 2222, I/O controller 214 continues to issue theglobal bus write operation until a CR other than “retry” is received. Ifthe CR for the global bus write operation issued at block 2220 indicatesthat no other snooper holds a valid copy of the requested memory block(blocks 2224 and 5700), the process ends at block 2226 with the attachedI/O device 216 able to write to the requested memory block. If, however,I/O controller 214 determines at block 2224 that the CR indicates thatat least one stale cached copy of the requested memory block remainsoutside of its local coherency domain, I/O controller 214 performs aglobal “cleanup” by downgrading any conflicting DClaim operations itsnoops, as shown at block 2230, and issuing global bus kill operations,as depicted at block 2232, until a CR is received at block 2224indicating that no stale cached copies of the requested memory blockremain outside of the local coherency domain.

If I/O controller 214 determines at block 5700 that the CR indicatesthat no stale cached copies of the requested memory block remain outsideof the local coherency domain but at least one stale cached copy of therequested memory block remains within its local coherency domain, I/Ocontroller 214 performs a local “cleanup” by downgrading any conflictingDClaim operations it snoops, as shown at block 5702, and issuing localbus kill operations, as depicted at block 5704 until a CR is receivedindicating that no stale cached copies of the requested memory blockremain within data processing system 100 (blocks 2224 and 5700). Oncecleanup operations are complete, the process ends at block 2226.

As has been described, the implementation of Tn and Ten coherency statesprovides an indication of whether a possibly shared memory block isadditionally cached only within the local coherency domain.Consequently, when a requestor within the same coherency domain as acache holding a memory block in one of the Tn or Ten states issues anexclusive access operation (e.g., a bus DClaim, bus RWITM, bus DCBZ orbus write operation) for the memory block, the scope of broadcastoperations, such as bus kill operations, can advantageously berestricted to the local coherency domain, reducing interconnectbandwidth utilization.

B. Interconnect Operations

Referring now to FIGS. 58-72, exemplary local and global bus operationsin an illustrative data processing system 100 implementing Tn and Tencoherency states will now be described. In these figures, the T, Te, Tnor Ten states are collectively represented by the designation Tx, andblocks that are unchanged from prior figures other than by thesubstitution of “Tx” for the T and Te states are signified by the use ofprime notation.

Referring first to FIG. 58, there is depicted a high level logicalflowchart of an exemplary method of performing a local bus readoperation in a data processing system implementing Tn and Ten coherencystates in accordance with one embodiment of the present invention. Ascan be seen by comparison of FIG. 58 with FIG. 45, FIG. 58 issubstantially identical to FIG. 45, except for modifications reflectingthe introduction of the Tn and Ten coherency states. For example, block5804 replaces block 3104 in order to indicate that an M or Me snooper236 that affirms a local bus read operation and subsequently suppliesthe requested memory block updates its cache state to Tn (for an Msnooper 236) or Ten (for an Me snooper 236), thus indicating that therequested memory block is cached only within its local coherency domain.Other blocks that reference one of the T, Te, Tn or Ten states(collectively designated Tx) and are otherwise unchanged are signifiedin FIG. 58 by the use of prime notation, as noted above.

With reference now to FIGS. 59A-59B, there is depicted a high levellogical flowchart of an exemplary method of performing a global bus readoperation in a data processing system implementing Tn and Ten coherencystates in accordance with the present invention. The process begins atblock 3200, for example, at block 1820 of FIG. 54, with an L2 cache 230issuing a global bus read operation on its local interconnect 114. Thevarious partial responses that snoopers 122, 236 may provide todistributed response logic 210 in response to snooping the global busread operation are represented in FIG. 59A by the outcomes of decisionblocks 3202, 3210′, 3212, 3214, 3220, 3230, 3240, 3242′, 3244, and 3246.These partial responses in turn determine the CR for the global bus readoperation.

As shown at block 3202, if a snooper 236 of an L2 cache 230 affirms theglobal bus read operation with a partial response indicating that the L2cache 230 holds the requested memory block in either the M or Me state,the process proceeds from block 3202 through page connector P to block5902 of FIG. 59B. Block 5902 represents the fact that the M or Mesnooper 236 updates its cache state differently depending upon whetherthe M or Me snooper 236 is local (i.e., within the same coherencydomain) as the requesting L2 cache 230 as indicated by the scopeindicator in the global bus read operation. In either case, the snooper236 in the affirming L2 cache 230 may initiate transmission of therequested memory block to the requesting L2 cache 230 prior to receiptof the CR (i.e., provides “early” data), and upon receipt, the master232 in the requesting L2 cache 230 places the requested memory block inits L2 cache array 300 in the Sr state (blocks 5920 and 5922). However,the snooper 236 in the affirming L2 cache 230 updates the state of therequested memory block from M to T or from Me to Te if the snooper 236is not local to the requesting L2 cache 230 (block 5920) and updates thestate of the requesting memory block from M to Tn or from Me to Ten ifthe snooper 236 is local (block 5922). The process then returns to FIG.59A through page connector T and ends with distributed response logic210 generating a CR indicating “success”, as depicted at block 3208.

If a snooper 236 of an L2 cache 230 affirms the global bus readoperation with a partial response indicating that the L2 cache 230 holdsthe requested memory block in any the T, Tn, Te or Ten states(generically designated in block 3210′ as Tx) and an Sr′ snooper 236also affirms the bus read operation (block 3212), the process passesthrough page connector S to block 5908. Block 5908 indicates that theaffirming Tx snooper 236 updates the state of the requested memory blockdifferently depending upon whether the scope indicator of the global busread operation indicated that the snooper 236 is within the coherencydomain of the requesting L2 cache 230. In either case, the Sr′ snooper236 updates the state of the requested memory block to S and initiatestransmission of the requested memory block to the requesting L2 cache230 prior to receipt of the CR (blocks 5950 and 5952). Upon receipt, themaster 232 in the requesting L2 cache 230 places the requested memoryblock in L2 cache array 300 in the Sr state (blocks 5950 and 5952). Inaddition, the Tx snooper 236 updates the state of the requested memoryblock, if necessary, from Tn to T or from Ten to Te if the snooper 236is not local to the requesting L2 cache 230 (block 5950), but leaves thestate of the requested memory block unchanged if the Tx snooper 236 islocal to the requesting L2 cache (block 5952). The process then returnsto FIG. 59A through page connector T and ends with distributed responselogic 210 generating a CR indicating “success”, as depicted at block3208.

If the complex of partial responses includes a Tx snooper 236 affirmingthe global bus read operation (block 3210′), no Sr′ snooper 236affirming the bus read operation (block 3212), and a snooper 236providing an partial response (e.g., a type of retry) indicating that anSr′ snooper 236 may exist in the local data delivery domain but did notaffirm the global bus read operation, the process passes through pageconnector R to block 5906 of FIG. 59B. Block 5906 indicates that theaffirming Tx snooper 236 updates the state of the requested memory blockdifferently depending upon whether the scope indicator of the global busread operation indicated that the snooper 236 is within the coherencydomain of the requesting L2 cache 230. In either case, the Tx snooper236 that affirmed the global bus read operation initiates transmissionof the requested memory block to the requesting L2 cache 230 afterreceipt of the CR (blocks 5940 and 5942). Upon receipt, the master 232in the requesting L2 cache 230 places the requested memory block in L2cache directory 300 in the S state (since an Sr′ snooper 236 may behidden within the local domain the requesting cache 236 and only one Sr′snooper 236 is permitted in each domain for the requested memory block).In addition, the Tx snooper 236 updates the state of the requestedmemory block, if necessary, from Tn to T or from Ten to Te if thesnooper 236 is not local to the requesting L2 cache 230 (block 5940),but leaves the state of the requested memory block unchanged if the Txsnooper 236 is local to the requesting L2 cache (block 5942). Theprocess then returns to FIG. 59A through page connector T and ends withdistributed response logic 210 generating a CR indicating “success”, asdepicted at block 3208.

If the complex of partial responses includes a Tx snooper 236 affirmingthe global bus read operation, no Sr′ snooper 236 affirming the bus readoperation, and no snooper 236 providing a partial response that may hidea Sr′ snooper 236, the process passes through page connector Q to block5904 of FIG. 59B. Block 5904 indicates that the affirming Tx snooper 236updates the state of the requested memory block differently dependingupon whether the scope indicator of the global bus read operationindicated that the snooper 236 is within the coherency domain of therequesting L2 cache 230. In either case, the Tx snooper 236 thataffirmed the global bus read operation initiates transmission of therequested memory block to the requesting L2 cache 230 after receipt ofthe CR (i.e., provides “late” data), the master 232 in the requesting L2cache 230 places the requested memory block in its L2 cache array 300 inthe Sr state (since no other Sr′ snooper 236 exists for the requestedmemory block in the local domain). In addition, the Tx snooper 236updates the state of the requested memory block, if necessary, from Tnto T or from Ten to Te if the snooper 236 is not local to the requestingL2 cache 230 (block 5930), but leaves the state of the requested memoryblock unchanged if the Tx snooper 236 is local to the requesting L2cache (block 5952). The process then returns to FIG. 59A through pageconnector T and ends with distributed response logic 210 generating a CRindicating “success”, as depicted at block 3208.

Referring now to block 3220, if no M, Me, or Tx snooper 236 affirms theglobal bus read operation, but an Sr′ snooper 236 affirms the global busread operation, the global bus read operation is serviced in accordancewith block 3222. In particular, the Sr′ snooper 236 that affirmed theglobal bus read operation initiates transmission of the requested memoryblock to the requesting L2 cache 230 prior to receipt of CR and updatesthe state of the requested memory block in its L2 cache directory 302 tothe S state. The master 232 in the requesting L2 cache 230 places therequested memory block in L2 cache array 300 in the Sr state. Theprocess ends with distributed response logic 210 generating a CRindicating “success”, as depicted at block 3208.

Turning now to block 3230, if no M, Me, Tx or Sr′ snooper 236 affirmsthe global bus read operation, and further, if no snooper 122 provides apartial response indicating that it is responsible (i.e., the LPC) forthe requested memory block, an error occurs that halts processing asshown at block 3232 because every memory block is required to have anLPC.

Referring now to block 3240, if a snooper 122 provides a partialresponse indicating that it is responsible (i.e., the LPC) for therequested memory block but does not affirm the global bus readoperation, response logic 210 generates a CR indicating “retry”, asdepicted at block 3250. As indicated by decision block 3242′, responselogic 210 similarly generates a “retry” CR at block 3250 if a memorycontroller snooper 122 affirms the global bus read operation and an L2cache snooper 236 provides a partial response indicating that it mayhold the requested memory block in one of the M, Me, or Tx states butcannot affirm the global bus read operation. In each of these cases,response logic 210 generates a “retry” CR to cause the operation to bereissued because one of the possibly hidden snoopers 236 may be requiredto source the requested memory block to the requesting L2 cache 230.

With reference now to block 3244, if no M, Me, Tx or Sr′ snooper 236affirms the bus read operation, no M, Me, or Tx snooper 236 is possiblyhidden, and a memory controller snooper 122 affirms the global bus readoperation, the snooper 122 affirming the global bus read operationprovides the requested memory block 3000 and the associated domainindicator 3004 to the requesting L2 cache 230 in response to the CR, asdepicted at each of blocks 3252 and 3254. As shown at blocks 3244, 3246,3252, 3254 and 3256, the master 232 of the requesting L2 cache 230handles the requested memory block in accordance with the partialresponses compiled into the “success” CR represented at block 3208. Inparticular, if the CR indicates that no Sr′ or S′ snooper 236 ispossibly hidden, the requesting L2 cache 230 holds the requested memoryblock in the Me state (block 3256); the requesting L2 cache 230 holdsthe requested memory block in the Sr state if no Sr′ snooper 236 ispossibly hidden and a S′ snooper 236 is possibly hidden; and therequesting L2 cache 230 holds the requested memory block in the S stateif an Sr′ snooper 236 is possibly hidden.

In response to the CR, the memory controller snooper 122 that is the LPCfor the requested memory block then determines whether to update thedomain indicator for the requested memory block, as illustrated atblocks 3260, 3262, 3270, 3272 and 3274. If the CR indicates that the newcache state for the requested memory block is Me, the LPC snooper 122determines whether it is within the same domain as the requesting L2cache 230 (block 3260), for example, by reference to the scope indicatorin the global bus read operation, and whether the domain indicator 3004indicates local or global (blocks 3260 and 3272). If the LPC is withinthe same domain as the requesting L2 cache 230 (block 3260), the LPCsnooper 122 sets the domain indicator 3004 to “local” if it is reset to“global” (block 3262 and 3264). If the LPC is not within the same domainas the requesting L2 cache 230 (block 3260), the LPC snooper 122 resetsthe domain indicator 3004 to “global” if it is set to “local” (block3272 and 3274).

If the CR indicates that the new cache state for the requested memoryblock 3000 is S or Sr, the LPC snooper 122 similarly determines whetherit is within the same domain as the requesting L2 cache 230 (block 3270)and whether the domain indicator 3004 indicates local or global (block3272). If the LPC is within the same domain as the requesting L2 cache230 (block 3270), no update to the domain indicator 3004 is required.If, however, the LPC is not within the same domain as the requesting L2cache 230 (block 3270), the LPC snooper 122 resets the domain indicator3004 to “global” if it is set to “local” (block 3272 and 3274). Thus,LPC snooper 122 updates the domain indicator 3004, if required, inresponse to receipt of the CR.

Referring now to FIG. 60, there is depicted a high level logicalflowchart of an exemplary method of performing a local bus RWITMoperation in a data processing system implementing coherency domains anddomain indicators in accordance with the present invention. As indicatedby like reference numerals, the illustrated method is similar to thosedepicted in FIGS. 33 and 46.

The process begins at block 3300, for example, with a master 232 of anL2 cache 230 issuing a local bus RWITM operation its local interconnect114 at block 1948 of FIG. 55A. The various partial responses thatsnoopers 122, 236 may provide to distributed response logic 210 arerepresented in FIG. 33 by the outcomes of decision blocks 3302, 3310′,3312, 3320, 4624, 3330, 3334′, 3340 and 4644′. These partial responsesin turn determine the CR for the local bus RWITM operation.

If a snooper 236 affirms the local bus RWITM operation with a partialresponse indicating that the L2 cache 230 containing the snooper 236holds the requested memory block in either the M or Me state as shown atblock 3302, the process proceeds from block 3302 to block 3304. Block3304 indicates the operations of the requesting L2 cache 230 and theaffirming L2 cache 230 in response to the local bus RWITM operation. Inparticular, the snooper 236 in the affirming L2 cache 230 updates thecache state of the requested memory block from the M or Me state to theI state and may initiate transmission of the requested memory block tothe requesting L2 cache 230 prior to receipt of the CR (i.e., provides“early” data). Upon receipt, the master 232 in the requesting L2 cache230 places the requested memory block in its L2 cache array 300 in the Mstate. The process ends with distributed response logic 210 generating aCR indicating “success”, as depicted at block 3306.

Referring to block 3310′, if a snooper 236 affirms the local bus RWITMoperation with a partial response indicating that the L2 cache 230containing the snooper 236 holds the requested memory block in any ofthe T, Tn, Te or Ten states (generically designated as Tx in FIG. 60)and no Sr′ snooper 236 affirms the local bus RWITM operation (block3312), the process passes to block 3314′. Block 3314′ represents the Txsnooper 236 that affirmed the local bus RWITM operation initiatingtransmission of the requested memory block to the requesting L2 cache230 in response to receipt of the CR from response logic 210. Inresponse to receipt of the requested memory block, the requesting L2cache 230 holds the requested memory block in the M state. All validaffirming snoopers 236 update their respective cache states for therequested memory block to I.

If the complex of partial responses includes a Tx snooper 236 and an Sr′snooper 236 both affirming the local bus RWITM operation (blocks 3310′and 3312), the process passes to block 3316. Block 3316 represents theSr′ snooper 236 that affirmed the local bus RWITM operation initiatingtransmission of the requested memory block to the requesting L2 cache230 prior to receipt of the CR provided by response logic 210. Inresponse to receipt of the requested memory block, the requesting L2cache 230 holds the requested memory block in the M state. All validaffirming snoopers 236 update their respective cache states for therequested memory block to I.

As shown at block 6000, in either of the cases represented by blocks3316 and 3314′, response logic 210 generates a CR dependent upon whetherthe Tx affirming snooper 236 held the requested memory block in one ofthe T/Te states or the Tn/Ten states. If the Tx snooper 236 was T or Te,response logic 210 generates a CR indicating “cleanup”, as shown atblock 3318. If, however, the Tx snooper 236 was Tn or Ten, responselogic 210 advantageously restricts the scope of the cleanup operationsto the local domain by generating a CR indicating “local cleanup”, asshown at block 6002.

The local bus RWITM operation cannot be serviced by a L2 cache snooper236 without retry if no M, Me, or Tx snooper 236 (i.e., HPC) affirms thelocal bus RWITM operation to signify that it can mediate the datatransfer. Accordingly, if an Sr′ snooper 236 affirms the local bus RWITMoperation and supplies early data to the requesting L2 cache 230 asshown at block 3320, the master 232 of the requesting L2 cache 230discards the data provided by the Sr′ snooper 236, as depicted at block3322.

Block 4624 represents the differences in handling the local bus RWITMoperation depending upon whether a snooper 236 of an L2 cache 230provides a partial response affirming the local bus RWITM operation andindicating that the L2 cache 230 holds the address tag of the requestedmemory block in the Ig state. If so, any affirming snooper 236 otherthan the Ig snooper 236 invalidates the relevant cache entry (block3332). If no M, Me, or Tx snooper 236 is possibly hidden by anincomplete partial response (block 3334), distributed response logic 210provides a “go global” CR, as depicted at block 3336. If, on the otherhand, an Ig snooper 236 affirms the local bus RWITM operation and thecomplex of partial responses indicates an M, Me, or Tx snooper 236 ispossibly hidden, response logic 210 generates a “retry” CR, as depictedat block 3338. Thus, the affirmance of the local bus RWITM operation byan Ig snooper 236 will cause the operation to be reissued as a globaloperation if no HPC is possibly hidden in the local coherency domain.

If an Ig snooper 236 does not affirm the local bus RWITM operation atblock 4624, the local bus RWITM operation is handled in accordance withblock 3330 and following blocks. In particular, if no memory controllersnooper 122 provides a partial response indicating that it isresponsible (i.e., the LPC) for the requested memory block (block 3330),each valid affirming snooper 236 invalidates the requested memory blockin its respective L2 cache directory 302 (block 3332). The CR generatedby response logic 210 depends upon whether any partial responsesindicate that an M, Me, or Tx snooper 236 may be hidden (block 3334′).That is, if no M, Me, or Tx snooper 236 may be hidden, response logic210 generates a “go global” CR at block 3336 to inform the master 232that the local bus RWITM operation must be reissued as a global RWITMoperation. On the other hand, if an M, Me, or Tx snooper 236 (i.e., anHPC) for the requested memory block may be hidden, response logic 210generates a CR indicating “retry”, as depicted at block 3338, becausethe operation may be serviced locally if retried.

Similarly, valid affirming snoopers 236 invalidate their respectivecopies of the requested memory block (block 3342), and response logic210 provides a “retry” CR for the local bus RWITM operation (block 3338)if no M, Me, or Tx snooper 236 affirms the local bus RWITM operation anda snooper 122 provides a partial response indicating that it is the LPCbut does not affirm the local bus RWITM operation. A “retry” CR is alsogenerated at block 3338, and valid snoopers 236 invalidate theirrespective valid copies of the requested memory block (block 3342) if noM, Me, or Tx snooper 236 affirmed the local bus RWTIM operation (blocks3302, 3310′), a snooper 122 affirmed the local bus RWITM operation(block 3340), and an M, Me, Tx or Ig snooper 236 may be possibly hidden(block 4644′).

As shown at block 3346, if no M, Me, or Tx snooper 236 affirms the localbus RWITM operation or is possibly hidden and the LPC snooper 122affirms the local bus RWITM operation, each valid affirming snooper 236invalidates its respective copy of the requested memory block. Inaddition, the LPC snooper 122 provides the requested memory block andassociated domain indicator 3004 to the requesting L2 cache 230 inresponse to receipt of the CR from response logic 210. The master 232 ofthe requesting L2 cache 230 handles the data in accordance with thedomain indicator 3004. In particular, if the domain indicator 3004 isreset to “global”, meaning that a remote cached copy may exist thatrenders stale the data received from the LPC snooper 122, master 232discards the data received from the LPC snooper 122, maintains aninvalid coherency state with respect to the requested memory block(block 3352), and interprets the CR provided by response logic 210 as“go global” (block 3336). If, on the other hand, the domain indicator3004 is set to “local”, meaning that no remote cached copy of therequested memory block renders the data received from the LPC snooper122 potentially stale, the master 232 places the requested memory blockand domain indicator 3004 in its L2 cache array 300 and sets theassociated state field 306 to M (block 3346). If the partial responsesand hence the CR indicate an S′ or Sr′ snooper 236 is possibly hidden(block 3354), the CR indicates “local cleanup” (block 6002), meaningthat the requesting L2 cache 230 must invalidate the other valid locallycached copies of the requested memory block, if any, through one or morelocal bus kill operations. If no such S′ or Sr′ snoopers 236 arepossibly hidden by incomplete partial responses, the CR indicates“success”, as depicted at block 3306.

It will be further appreciated that in some embodiments, the master ofthe local bus RWITM operation may speculatively perform a local cleanupas shown at block 6002 prior to receipt of the domain indicator 3004from the LPC (block 3350). In this manner, the latency associated withdata delivery from the LPC can be masked by the one or more local buskill operations involved in the local cleanup operations.

With reference now to FIGS. 61A-61B, there is illustrated a high levellogical flowchart of an exemplary method of performing a global busRWITM operation in a data processing system implementing the Tn and Tencoherency states in accordance with the present invention. As indicatedby like reference numbers, the illustrated process is similar to thatdescribed above with reference to FIG. 47.

As shown, the process begins at block 3400 in response to the master 232of a requesting L2 cache 230 issuing a global bus RWITM operation, forexample, at block 1954 of FIG. 55A. If a snooper 236 affirms the globalbus RWITM operation with a partial response indicating that the L2 cache230 containing the snooper 236 holds the requested memory block in the Mor Me state as shown at block 4702, the M or Me snooper 236 providesearly data to the requesting master 232, which holds the requestedmemory block in the M state (block 4704 or block 4706). Response logic210 generates a CR indicating “success”, as shown at block 3407. Inaddition, the M or Me snooper 236 updates its cache state to either I orIg depending upon whether or not it is local to (i.e., in the samecoherency domain as) the requesting master 232 (block 4702). If the M orMe snooper 236 determines it belongs to the same coherency domain as therequesting master 232, for example, by reference to the scope indicatorin the bus operation, the M or Me snooper 236 updates its cache statefor the requested memory block to I. On the other hand, if the M or Mesnooper 236 determines it does not belong to the same coherency domainas the requesting master 232, the M or Me snooper 236 updates its cachestate for the requested memory block to Ig in order to maintain a cacheddomain indicator for the requested memory block in its coherency domain.Consequently, no retry-push is required in response to the global busRWITM operation in order to update the domain indicator 3004 in the LPCsystem memory 108.

Turning now to block 6100, if a snooper 236 affirms the global bus RWITMoperation with a partial response indicating that the L2 cache 230containing the snooper 236 holds the requested memory block in eitherthe Tn or Ten state, the process passes to block 6102, which representsthe Tn or Ten snooper 236 determining whether or not it is local to therequesting master 232. If so, the global bus RWITM operation is handledin accordance with blocks 6104 and following blocks, which are describedbelow. If, however, the Tn or Ten snooper 236 affirming the global busRWITM operation determines that it is not local to the requesting master232, the global bus RWITM operation is serviced in accordance witheither block 6108 or block 6110, depending upon whether or not an Sr′snooper 236 also affirmed the global bus RWITM operation.

As shown at blocks 6108, if an Sr′ snooper 236 affirmed the global busRWITM operation, the Sr′ snooper 236 provides early data to therequesting master 232, and the Tn or Ten snooper 236 that affirmed theglobal bus RWITM operation updates its cache state for the entrycontaining the requested memory block to Ig. In response to receipt ofthe requested memory block, the requesting L2 cache 230 holds therequested memory block in the M state. In addition, any valid affirmingsnooper 236 other than the Tn or Ten snooper 236 updates its respectivecache state for the requested memory block to I. Alternatively, asdepicted at block 6110, if an Sr′ snooper 236 does not affirm the globalbus RWITM operation, the Tn or Ten snooper 236 provides late data inresponse to receipt of the CR. In response to receipt of the requestedmemory block, the requesting L2 cache 230 holds the requested memoryblock in the M state. In addition, the Tn or Ten snooper 236 updates itscache state to Ig, and any other valid affirming snooper 236 updates itsrespective cache state for the requested memory block to I. Thus, if aremote Tn or Ten snooper 236 affirms the global bus RWITM operation, theaffirming Tn or Ten snooper 236 enters the Ig state in order to maintaina cached domain indicator for the requested memory block in itscoherency domain. Consequently, no retry-push is required in response tothe global bus RWITM operation in order to update the domain indicator3004 in the LPC system memory 108.

In either of the cases represented by blocks 6108 and 6110, responselogic 210 generates a CR dependent upon whether an S′ or Sr′ snooper 236is possibly hidden and thus unable to invalidate its copy of therequested memory block in response to snooping the global bus RWITMoperation. If response logic 210 makes a determination at block 3424based upon the partial responses to the global bus RWITM operation thatan S′ or Sr′ snooper 236 is possibly hidden, response logic 210generates a CR indicating “cleanup”, as shown at block 3426.Alternatively, if response logic 210 determines that no S′ or Sr′snooper 236 is possibly hidden, response logic 210 generates a CRindicating “success”, as depicted at block 3407.

Returning to block 6104, if a Tn or Ten snooper 236 that is local to therequesting master 232 affirms the global bus RWITM operation, the globalbus RWITM operation is serviced in accordance with either block 6114 orblock 6116, depending upon whether or not an Sr′ snooper 236 alsoaffirmed the global bus RWITM operation.

As shown at blocks 6116, if an Sr′ snooper 236 affirmed the global busRWITM operation, the Sr′ snooper 236 provides early data to therequesting master 232, and each valid snooper 236 that affirmed theglobal bus RWITM operation updates its respective cache state for theentry containing the requested memory block to I. In response to receiptof the requested memory block, the requesting L2 cache 230 holds therequested memory block in the M state. Alternatively, as depicted atblock 6114, if an Sr′ snooper 236 does not affirm the global bus RWITMoperation, the Tn or Ten snooper 236 provides late data in response toreceipt of the CR. In response to receipt of the requested memory block,the requesting L2 cache 230 holds the requested memory block in the Mstate. In addition, each valid affirming snooper 236 updates itsrespective cache state for the requested memory block to I.

In either of the cases represented by blocks 6114 and 6116, responselogic 210 generates a CR dependent upon whether an S′ or Sr′ snooper 236is possibly hidden and thus unable to invalidate its copy of therequested memory block in response to snooping the global bus RWITMoperation. If response logic 210 makes a determination at block 6118based upon the partial responses to the global bus RWITM operation thatan S′ or Sr′ snooper 236 is possibly hidden, response logic 210generates a CR indicating “local cleanup”, as shown at block 6120. Thus,the scope of the bus kill operations required to ensure coherency areadvantageously limited to the local coherency domain containing therequesting L2 cache 230 and the (former) Tn or Ten snooper 236.Alternatively, if response logic 210 determines that no S′ or Sr′snooper 236 is possibly hidden, response logic 210 generates a CRindicating “success”, as depicted at block 3407.

Following page connector U to block 3410 of FIG. 61B, if a T or Tesnooper 236 affirms the global bus RWITM operation, the process passesto block 3412, which represents the T or Te snooper 236 determiningwhether or not it is local to the requesting master 232. If so, theglobal bus RWITM operation is handled in accordance with blocks 3418 andfollowing blocks, which are described in detail below. If, however, theT or Te snooper 236 affirming the global bus RWITM operation determinesthat it is not local to the requesting master 232, the global bus RWITMoperation is serviced in accordance with either block 4715 or block4716, depending upon whether or not an Sr′ snooper 236 affirmed theglobal bus RWITM operation.

As shown at blocks 4715, if an Sr′ snooper 236 affirmed the global busRWITM operation, the Sr′ snooper 236 provides early data to therequesting master 232, and the T or Te snooper 236 that affirmed theglobal bus RWITM operation updates its cache state for the entrycontaining the requested memory block to Ig. In response to receipt ofthe requested memory block, the requesting L2 cache 230 holds therequested memory block in the M state. In addition, any valid affirmingsnooper 236 other than the T or Te snooper 236 updates its respectivecache state for the requested memory block to I. Alternatively, asdepicted at block 4716, if an Sr′ snooper 236 does not affirm the globalbus RWITM operation, the T or Te snooper 236 provides late data inresponse to receipt of a CR. In response to receipt of the requestedmemory block, the requesting L2 cache 230 holds the requested memoryblock in the M state. In addition, the T or Te snooper 236 updates itscache state to Ig, and any other valid affirming snooper 236 updates itsrespective cache state for the requested memory block to I. Thus, if aremote T or Te snooper 236 affirms the global bus RWITM operation, theaffirming T or Te snooper 236 enters the Ig state in order to maintain acached domain indicator for the requested memory block in its coherencydomain. Consequently, no retry-push is required in response to theglobal bus RWITM operation in order to update the domain indicator 3004in the LPC system memory 108.

In either of the cases represented by block 4715 or block 4716, responselogic 210 generates a CR dependent upon whether an S′ or Sr′ snooper 236is possibly hidden and thus unable to invalidate its copy of therequested memory block in response to snooping the global bus RWITMoperation. If response logic 210 makes a determination at block 3424based upon the partial responses to the bus RWITM operation that an S′or Sr′ snooper 236 is possibly hidden, response logic 210 generates a CRindicating “cleanup”, as shown at block 3426. Alternatively, if responselogic 210 determines that no S′ or Sr′ snooper 236 is possibly hidden,response logic 210 generates a CR indicating “success”, as depicted atblock 3407.

Returning to blocks 3412 and 3418, if the T or Te snooper 236 determinesat block 3412 that it is local the requesting master 232, the global busRWITM operation is serviced in accordance with either block 3420 orblock 3422, depending upon whether an Sr′ snooper 236 also affirmed theglobal bus RWITM operation. That is, as shown at block 3420, if no Sr′snooper 236 affirms the global bus RWITM operation (block 3418), the Tor Te snooper 236 that affirmed the global bus RWITM operation initiatestransmission of the requested memory block to the requesting L2 cache230 in response to receipt of the CR (i.e., provides “late” data). Inresponse to receipt of the requested memory block, the requesting L2cache 230 holds the requested memory block in the M state. In addition,all valid affirming snoopers 236 update their respective cache statesfor the requested memory block to I. Alternatively, as depicted at block3422, if an Sr′ snooper 236 affirms the global bus RWITM operation(block 3418), the Sr′ snooper 236 initiates transmission of therequested memory block to the requesting L2 cache 230 prior to receiptof the CR (i.e., provides “early” data). In response to receipt of therequested memory block, the requesting L2 cache 230 holds the requestedmemory block in the M state. In addition, all valid affirming snoopers236 update their respective cache states for the requested memory blockto I. Following either block 3420 or block 3422, the process passes toblock 3424, which has been described.

Referring now to block 3430, if no M, Me, or Tx snooper 236 affirms theglobal bus RWITM operation, and further, if no snooper 122 provides apartial response indicating that it is responsible (i.e., the LPC) forthe requested memory block, an error occurs causing processing to halt,as depicted at block 3432. If, on the other hand, no M, Me, or Txsnooper 236 affirms the bus RWITM operation and a snooper 122 provides apartial response indicating that it is responsible (i.e., the LPC) forthe requested memory block but does not affirm the bus RWITM operation(block 3440), each valid affirming snooper 236 invalidates the requestedmemory block in its respective L2 cache directory 302 (block 3452), andresponse logic 210 generates a CR indicating “retry”, as depicted atblock 3454. In addition, data provided by an Sr′ snooper 236 affirmingthe global bus RWITM operation, if any, is discarded by the master 232(blocks 3448 and 3450). As indicated by decision block 3442, validaffirming snoopers 236 similarly invalidate their respective copies ofthe requested memory block at block 3452 and response logic 210generates a “retry” CR at block 3454 if a memory controller snooper 122affirms the global bus RWITM operation (block 3440) and an L2 cachesnooper 236 provides a partial response indicating that it may hold therequested memory block in one of the M, Me, or Tx states but cannotaffirm the global bus RWITM operation.

With reference now to block 3444, if no M, Me, or Tx snooper 236 affirmsthe global bus RWITM operation or is possibly hidden, a snooper 122affirms the global bus RWITM operation, and a Sr′ snooper 236 affirmsthe global bus RWITM operation, the global bus RWITM operation isserviced in accordance with block 3422 and following blocks, which aredescribed above. Assuming these same conditions except for the absenceof an Sr′ snooper 236 affirming the global bus RWITM operation, theglobal bus RWITM operation is serviced in accordance with block 3446. Inparticular, in response to the CR, the LPC snooper 122 provides therequested memory block to the requesting L2 cache 230, which obtains therequested memory block in the M state, and all valid affirming snoopers236 invalidate their respective copies of the requested memory block, ifany.

Following block 3446, the process passes to blocks 3460-3466, whichcollectively represent the LPC snooper 122 determining whether or not toupdate the domain indicator 3004 for the requested memory block basedupon whether the LPC snooper 122 is local to the requesting master 232(block 3460) and the present state of the domain indicator (blocks 3462and 3464). If the LPC snooper 122 is local to the requesting L2 cache230 and the domain indicator 3004 in system memory 108 is set toindicate “local”, no update is required, and the process passes throughpage connector V to block 6118 of FIG. 61A, which has been described. Onthe other hand, LPC snooper 122 changes the state of the domainindicator 3004 at block 3466 if LPC snooper 122 is local to therequesting master 232 and domain indicator 3004 is reset to indicate“global” or if LPC snooper 122 is not local to the requesting master 232and domain indicator 3004 is reset to indicate “local”.

If the partial responses indicate an S′ or Sr′ snooper 236 is possiblyhidden (block 3424), the requesting L2 cache 230 receives a “cleanup” CRindicating that it must invalidate any other valid cached copies of therequested memory block. If no S′ or Sr′ snoopers 236 are possibly hiddenby incomplete partial responses, response logic 210 generates a“success” CR, as depicted at block 3407.

With reference now to FIG. 62, there is illustrated a high level logicalflowchart of an exemplary method of performing a local bus DClaimoperation in a data processing system implementing Tn and Ten coherencystates in accordance with preferred embodiments of the presentinvention. As indicated by like reference numerals, the depicted processis similar to that illustrated in FIG. 26 and described above.

As shown, the process begins at block 2600, for example, with a master232 issuing a local bus DClaim operation on a local interconnect 114 atblock 1932 of FIG. 55A. The various partial responses that snoopers 236may provide to distributed response logic 210 in response to the localbus DClaim operation are represented in FIG. 62 by the outcomes ofdecision blocks 2602, 2610, 2620, 6200, and 6204. These partialresponses in turn determine what CR response logic 210 generates for thelocal bus DClaim operation.

As shown at block 2602, if any snooper 236 issues a partial responsedowngrading the local bus DClaim operation to a bus RWITM operation asillustrated, for example, at blocks 1924 and 5504 of FIG. 55A, eachvalid affirming snooper 236 (i.e., not Ig snooper(s) 236) other than thedowngrading snooper 236 invalidates its respective copy of the requestedmemory block, if any (block 2603), and distributed response logic 210generates a CR indicating “downgrade”, as shown at block 2604. Inresponse to this CR, the master 232 of the local bus DClaim operationmust next attempt to gain ownership of the requested memory blockutilizing a local bus RWITM operation, as depicted at block 1948 of FIG.55A.

If a snooper 236 affirms the local bus DClaim operation with a partialresponse indicating that the L2 cache 230 containing the snooper 236holds the requested memory block in either the T or Te state as shown atblock 2610, the process passes to block 2612. Because no data transferis required in response to a bus DClaim operation, block 2612 indicatesthat the master 232 in the requesting L2 cache 230 updates the cachestate of the requested memory block in L2 cache directory 302 to the Mstate. All valid affirming snoopers 236 update their respective cachestates for the requested memory block to I. As shown at block 2618,distributed response logic 210 generates a CR indicating “cleanup”,meaning that the requesting L2 cache 230 must issue one or more bus killoperations to invalidate copies of the requested memory block, if any,held outside of the local coherency domain.

As illustrated at block 6200, if a Tn or Ten snooper 236 affirms thelocal bus DClaim operation, the process passes to block 6202. Because nodata transfer is required in response to a bus DClaim operation, block2612 indicates that the master 232 in the requesting L2 cache 230updates the cache state of the requested memory block in L2 cachedirectory 302 to the M state. All valid affirming snoopers 236 updatetheir respective cache states for the requested memory block to I. Asshown at block 6204, distributed response logic 210 generates a CR thatis dependent upon whether the partial responses received by responselogic 210 indicate that an Sr′ or S′ snooper 236 may be possibly hidden.If not, distributed response logic 210 generates a response indicating“success”, as shown at block 6206, because the presence of the Tn or Tencoherency state guarantees that no L2 cache 230 outside of the localcoherency domain holds a copy of the requested memory block. If thepartial responses indicate that an Sr′ or S′ snooper 236 may be possiblyhidden, response logic 210 generates a CR indicating “local cleanup”, asshown at block 6208. Only local cleanup operations are required becausethe Tn or Ten coherency state again guarantees that no L2 cache 230outside of the local coherency domain holds a valid copy of therequested memory block.

Turning now to block 2620, if no snooper downgrades the local bus DClaimoperation (block 2602), no Tx snooper 236 affirms the local bus DClaimoperation (blocks 2610 and 6200), and further, and a snooper 236provides a partial response indicating that it may hold the requestedmemory block in a Tx state but cannot affirm the local bus DClaimoperation, each valid affirming snooper 236 invalidates its respectivecopy of the requested memory block, if any (block 2621), and responselogic 210 generates a CR indicating “retry”, as depicted at block 2622.In response to the “retry” CR, the requesting master 232 may reissue thebus DClaim operation as either a local or global operation, as explainedabove with reference to block 1931 of FIG. 55A. If, however, no snooperdowngrades the local bus DClaim operation (block 2602), no Tx snooper236 affirms the bus DClaim operation or is possibly hidden (blocks 2602,2610, 6200, and 2620), response logic 210 provides a “go global” CR, asshown at block 2632, and all affirming snoopers, if any, having a validcopy of the requested memory block invalidate their respective copies ofthe requested memory block, as shown at block 2630. In response to the“go global” CR, the master 232 reissues the bus DClaim operation as aglobal operation, as depicted at block 1940 of FIG. 55A.

Referring now to FIG. 63, there is depicted a high level logicalflowchart of an exemplary method of performing a global bus DClaimoperation in a data processing system implementing Tn and Ten coherencystates in accordance with the present invention. The process begins atblock 3500, for example, with a master 232 of an L2 cache 230 issuing aglobal bus DClaim operation on interconnects 110, 114 at block 1940 ofFIG. 55A. The various partial responses that snoopers 122, 236 mayprovide to distributed response logic 210 in response to the global busDClaim operation are represented in FIG. 35 by the outcomes of decisionblocks 3502, 3510′, 3518, 3530, 3540, 3542′ and 6300 These partialresponses in turn determine what CR response logic 210 generates for theglobal bus DClaim operation.

As shown at block 3502, if any snooper 236 issues a partial responsedowngrading the global bus DClaim operation to a bus RWITM operation,each valid affirming snooper 236 other than the downgrading snooper 236invalidates its respective copy of the requested memory block, if any(block 3503), and distributed response logic 210 generates a CRindicating “downgrade”, as shown at block 3504. In response to this CR,the master 232 of the global bus DClaim operation must next attempt togain ownership of the requested memory block utilizing a bus RWITMoperation, as depicted at blocks 1948 and 1954 of FIG. 55A.

If a Tx (e.g., T, Te, Tn, or Ten) snooper 236 affirms the global busDClaim operation as shown at block 3510, the process passes to block3512. Block 3512 depicts the Tx snooper 236 determining whether it islocal to the requesting master 232. If not, the Tx snooper 236 updatesthe state of its relevant entry to Ig to maintain a cached domainindicator for the requested memory block as shown at block 4814. Inaddition, the requesting master 232 updates the coherency state of itscopy of the requested memory block to M, and each valid affirmingsnooper 236 other than the Tx snooper 236 (i.e., not an Ig snooper 236)updates its coherency state for the requested memory block to I (block4814).

Returning to block 3512, if the Tx snooper 236 determines that it islocal to the requesting master 232, the global bus DClaim operation ishandled in accordance with block 3516. In particular, the master 232 inthe requesting L2 cache 230 updates the state of its copy of therequested memory block to the M state, and all valid affirming snoopers236 update their respective cache states for the requested memory blockto I.

As shown at blocks 3518 and 3522, if the partial responses indicate thatno S′ or Sr′ snooper 236 is possibly hidden, the process ends withdistributed response logic 210 generating a CR indicating “success”(block 3522). If, on the other hand, a determination is made at block3518 that at least one partial response indicating the presence of apossibly hidden S′ or Sr′ snooper 236 was given in response to theglobal bus DClaim operation, some type of cleanup operation will berequired. If the affirming Tx snooper 236 is within the same coherencydomain as the requesting master 232 and, prior to the operation, was inone of the Te and Ten states, distributed response logic 210 generates aCR indicating “local cleanup” (block 6302), meaning that the requestingL2 cache 230 must issue one or more local bus kill operations toinvalidate the requested memory block in any such hidden S′ or Sr′snooper 236. If the affirming Tx snooper 236 is not within the samecoherency domain as the requesting master 232 or the affirming Txsnooper 236 was, prior to the operation, in one of the T or Te coherencystates, global cleanup is required, and response logic 210 generates aCR indicating “cleanup” (block 3520). Thus, the presence of a Tn or Tencoherency state can again be utilized to limit the scope of bus killoperations.

Turning now to block 3530, if no Tx snooper 236 affirms the global busDClaim operation, and further, if no snooper 122 provides a partialresponse indicating that it is responsible (i.e., the LPC) for therequested memory block, an error occurs causing processing to halt, asdepicted at block 3532. If, on the other hand, no Tx snooper 236 affirmsthe global bus DClaim operation and a snooper 122 provides a partialresponse indicating that it is responsible (i.e., the LPC) for therequested memory block but does not affirm the global bus DClaimoperation (block 3540), each valid affirming snooper 236 invalidates itsrespective copy of the requested memory block, if any (block 3543), andresponse logic 210 generates a CR indicating “retry”, as depicted atblock 3544. Response logic 210 similarly generates a “retry” CR at block3544 and each valid affirming snooper 236 other than the downgradingsnooper 236 invalidates its respective copy of the requested memoryblock, if any (block 3543) if a memory controller snooper 122 affirmsthe bus DClaim operation (block 3540) and an Tx snooper 236 may bepossibly hidden (block 3542′).

As depicted at block 3542′, if no Tx snooper 236 affirms the global busDClaim operation or is possibly hidden and a snooper 122 affirms theglobal bus DClaim operation, the global bus DClaim operation is servicedin accordance with block 3516, which is described above.

With reference now to FIG. 64, there is illustrated a high level logicalflowchart of an exemplary method of performing a local bus killoperation in a data processing system implementing Tn and Ten coherencystates in accordance with the present invention. As mentioned above, thelimitation of scope of the local bus kill operation to one coherencydomain is enabled by the additional information provided by the Tn andTen coherency states, namely, that no shared copy of the memory blockresides outside of the coherency domain.

As depicted, the process begins at block 6400, for example, with themaster 232 of an L2 cache 230 issuing a local bus kill operation on itslocal interconnect 114, for example, at block 5508 of FIG. 55B, block5608 of FIG. 56B or block 5704 of FIG. 57. The various partial responsesthat snoopers 122, 236 may provide to distributed response logic 210 inresponse to the bus kill operation are represented in FIG. 64 by theoutcomes of decision blocks 6402 and 6406. These partial responses inturn determine what CR response logic 210 generates for the local buskill operation.

In particular, as depicted at blocks 6402 and 6404, any snooper 236affirming the bus kill operation in any of the M, Me, Tx, Sr′ or S′states invalidates its copy of the requested memory block without anytransmission of data in response to receipt of the CR. An affirming Igsnooper 236, if any, remains in the Ig state. As further shown at blocks6406, 6408 and 6410, response logic 210 generates a CR indicating “localcleanup” if any snooper 236 provides a partial response not affirmingthe local bus kill operation and otherwise generates a CR indicating“success”.

Referring now to FIG. 65, there is depicted a high level logicalflowchart of an exemplary method of performing a global bus killoperation in a data processing system implementing Tn and Ten coherencystates in accordance with the present invention. As indicated by the useof like reference numerals, the illustrated process is identical to thatdepicted in FIG. 49 and described above, except for the modification toblock 4902′ to indicate that memory blocks held in the Tn and Tencoherency states are handled like those held in any of the M, Me, T, Te,Sr, or S coherency states.

With reference now to FIG. 66, there is depicted a high level logicalflowchart of an exemplary method of performing a local bus DCBZoperation in a data processing system implementing Tn and Ten coherencystates in accordance with preferred embodiments of the presentinvention. As indicated by like reference numerals, the illustratedmethod is substantially similar to FIG. 27.

The process begins at block 2700, for example, with the issuance of alocal bus DCBZ operation on a local interconnect 114 at block 2052 ofFIG. 56A. The various partial responses that snoopers 236 may provide todistributed response logic 210 are represented in FIG. 66 by theoutcomes of decision blocks 2702, 6600, 6604, 2710, and 2720. Thesepartial responses in turn determine the CR for the local bus DCBZoperation.

If a snooper 236 affirms the local bus DCBZ operation with a partialresponse indicating that the L2 cache 230 containing the snooper 236holds the requested memory block in either the M or Me state as shown atblock 2702, the process proceeds to block 2704. Block 2704 indicates theoperations of the requesting L2 cache 230 and affirming L2 cache 230 inresponse to the request. In particular, the master 232 in the requestingL2 cache 230 updates the cache state of the requested memory block tothe M state (no data is transferred), and the M or Me snooper 236 in theaffirming L2 cache 230 updates the cache state of the requested memoryblock to the I state. The process then ends with distributed responselogic 210 generating a CR indicating “success”, as depicted at block2706.

As depicted at blocks 6600 and 6602, if a Tn or Ten snooper 236 affirmsthe local bus DCBZ operation, the Tn or Ten snooper 236 and any othervalid affirming snooper 236 (i.e., not Ig snooper(s) 236) invalidatesits copy of the requested memory block, and the requesting L2 cache 230updates its cache state for the requested memory block to the M state.If response logic 210 received a partial response indicating that an Sr′or S′ snooper 236 is possibly hidden (block 6604), response logic 210generates a CR indicating “local cleanup”, as illustrated at block 6606.Thus, the existence of the Tn or Ten state enables the scope of cleanupoperations to be restricted to the local coherency domain. If responselogic 210 determines at block 6604 that no Sr′ or S′ snooper 236 ispossibly hidden, response logic 210 generates a CR indicating “success”,as shown at block 2706.

Referring now to block 2710, if a T or Te snooper 236 affirms the localbus DCBZ operation, the process passes to block 2712. Block 2712represents the T or Te snooper 236 and any other valid affirmingsnooper(s) 236 invalidating its copy of the requested memory block andthe master 232 in the requesting L2 cache 230 updating the cache stateof the requested memory block to the M state. As further illustrated atblock 2716, distributed response logic 210 generates a CR indicating“cleanup” in order to ensure the invalidation of copies of the requestedmemory block, if any, held in L2 caches 230 outside of the localcoherency domain.

Turning now to block 2720′, if no M, Me, or Tx snooper 236 affirms thelocal bus DCBZ operation (blocks 2702 and 2710), and further, a snooper236 provides a partial response indicating that it may hold therequested memory block in the M, Me, or Tx state but cannot affirm thelocal bus DCBZ operation, each valid affirming snooper 236 invalidatesits respective copy of the requested memory block, if any (block 2721),and response logic 210 generates a CR indicating “retry”, as depicted atblock 2722. In response to the “retry” CR, the requesting master 232 mayreissue the bus DCBZ operation as either a local or global operation, asexplained above with reference to block 2050 of FIG. 20. If, however, noM, Me, or Tx snooper 236 affirms the bus DClaim operation or is possiblyhidden (blocks 2702, 2710, 2720′), response logic 210 provides a “goglobal” CR, as shown at block 2732, and all valid affirming snoopers, ifany, having a valid copy of the requested memory block invalidate theirrespective copies of the requested memory block, as shown at block 2730.In response to the “go global” CR, the master 232 reissues the bus DCBZoperation as a global operation, as depicted at block 2060 of FIG. 56A.

Referring now to FIG. 67, there is depicted a high level logicalflowchart of an exemplary method of performing a global bus DCBZoperation in a data processing system implementing Tn and Ten coherencystates in accordance with the present invention. The process begins atblock 3600, for example, with the master 232 of an L2 cache 230 issuinga global bus DCBZ operation on interconnects 110, 114 at block 2060 ofFIG. 56A. The various partial responses that snoopers 122, 236 mayprovide to distributed response logic 210 are represented in FIG. 67 bythe outcomes of decision blocks 3602, 3610, 3612, 3630′, 3638, 6700 and3650′. These partial responses in turn determine the CR for the globalbus DCBZ operation.

As indicated at blocks 3602-3604, if no snooper 122 provides a partialresponse indicating that it is responsible (i.e., the LPC) for therequested memory block, an error halting processing occurs, since the noLPC was found. If a snooper 122 indicates that it is the LPC for therequested memory block, but does not affirm the global DCBZ operation,each valid affirming snooper 236 invalidates its respective copy of therequested memory block, if any (block 3651), and response logic 210generates a CR indicating “retry”, as depicted at block 3652. A “retry”CR is similarly generated by response logic 210 at block 3652 and eachvalid affirming snooper 236 invalidates its respective copy of therequested memory block, if any (block 3651) if a snooper 122 affirms theglobal bus DCBZ operation, no M, Me, or Tx snooper 236 affirms theglobal bus DCBZ operation, and an M, Me, or Tx snooper 236 is possiblyhidden.

If a snooper 236 affirms the global bus DCBZ operation with a partialresponse indicating that the L2 cache 230 containing the snooper 236holds the requested memory block in either the M or Me state as shown atblock 3612, the process proceeds to block 3614. Block 3614 indicates theoperations of the requesting L2 cache 230 and the affirming L2 cache 230in response to the global bus DCBZ operation. In particular, the master232 in the requesting L2 cache 230 updates the cache state of therequested memory block to the M state (no data is transferred), and theM or Me snooper 236 in the affirming L2 cache 230 updates the cachestate of the requested memory block to the I state. As further shown atblock 3616 and 3618, the LPC snooper 122 also resets the domainindicator 3004 associated with the requested memory block to “global” ifthe LPC snooper 122 is not within the same coherency domain as therequesting master 232. The process ends with distributed response logic210 generating a CR indicating “success”, as depicted at block 3620.

If a Tx snooper 236 affirms the global bus DCBZ operation as shown atblock 3630′, the process passes to block 3632. Block 3632 represents theTx snooper 236 and any other valid affirming snooper 236 invalidatingits copy of the requested memory block and the master 232 in therequesting L2 cache 230 updating the cache state of its copy of therequested memory block to the M state. As further shown at block 3634and 3636, the LPC snooper 122 also resets the domain indicator 3004associated with the requested memory block to “global” if the LPCsnooper 122 is not within the same coherency domain as the requestingmaster 232.

If response logic 210 determines at block 3638 that the partialresponses indicate that no S′ or Sr′ snooper 236 is possibly hidden,distributed response logic 210 provides a CR indicating “success” asshown at block 3606. If, on the other hand, at least one partialresponse indicating the presence of a possibly hidden S′ or Sr′ snooper236 was given in response to the global bus DCBZ operation, cleanupoperations are required. Accordingly, as shown at blocks 6700, 6702 and3640, distributed response logic 210 generates a CR indicating “localcleanup” if the LPC snooper 122 is local to the requesting master 232and the affirming snooper 236 held the requested memory block in one ofthe Tn or Ten coherency states, and otherwise generates a CR indicatingglobal “cleanup”.

As indicated by decision block 3650, if a memory controller snooper 122affirms the global bus DCBZ operation (block 3610) and no M, Me, or Txsnooper 236 affirms the global bus DCBZ operation or is possibly hidden(blocks 3612, 3630′ and 3650′), the global bus DCBZ operation isserviced as described above with reference to block 3632 and followingblocks.

With reference now to FIG. 68, there is illustrated a high level logicalflowchart of an exemplary method of performing a local bus castoutoperation in a data processing system implementing Tn and Ten coherencystates in accordance with preferred embodiments of the presentinvention. As indicated by like reference numerals, the depicted processis substantially similar to that shown in FIG. 39 and described above.

The process begins at block 3900, for example, with the issuance of alocal bus castout operation on a local interconnect 114 at block 4406 ofFIG. 44. The various partial responses that snoopers 122, 236 mayprovide to distributed response logic 210 are represented in FIG. 68 bythe outcomes of decision blocks 3902′ and 3910. These partial responsesin turn determine the CR for the local bus castout operation.

If a snooper 236 affirms the local bus castout operation with a partialresponse indicating that the L2 cache 230 containing the snooper 236holds the requested memory block in any of the M, Me, or Tx states asshown at block 3902′, an error halting processing occurs, as indicatedat block 3904, because the memory block being castout can have only oneHPC (i.e., the requesting L2 cache 230).

As depicted at block 3910, if no M, Me or Tx snooper 236 affirms thelocal bus castout operation (block 3902), and further, if no snooper 122provides a partial response indicating that it is responsible (i.e., theLPC) for the requested memory block, response logic 210 provides a “goglobal” CR, as depicted at block 3912, because the LPC is a requiredparticipant to receive the castout memory block. If, however, no M, Me,or Tx snooper 236 affirms the bus castout operation (block 3902) and asnooper 122 provides a partial response indicating that it isresponsible (i.e., the LPC) for the requested memory block but does notaffirm the bus castout operation (blocks 3910 and 3920), response logic210 generates a CR indicating “local retry”, as depicted at block 3930,because the LPC is in the local coherency domain but must be availableto receive the castout memory block. If a memory controller snooper 122affirms the bus castout operation (block 3920) and no M, Me, or Txsnooper 236 affirms the bus castout operation (block 3902), therequesting L2 cache 230 invalidates the memory block within its cachedirectory 302 and transmits the memory block to the LPC (block 3924 orblock 5028), unless the requesting L2 cache 230 is in the Ig state. Inaddition to updating the memory block, the LPC snooper 122 sets theassociated domain indicator 3004 to “local” if the memory block is inthe M, Me, Tn or Ten state (blocks 6800 and 3924), and resets theassociated domain indicator 3004 to “global” if the memory block is inthe T or Te state (blocks 6800 and 5028). The update of the domainindicator 3004 to local is possible because a castout of a memory blockin either of the M, Me, Tn or Ten states guarantees that no remotelycached copy of the memory block exists. In response to an affirmativedetermination at block 3920, response logic 210 generates a CRindicating “success”, as illustrated at block 3926.

Referring now to FIG. 69, there is depicted a high level logicalflowchart of an exemplary method of performing a global bus castoutoperation in a data processing system implementing the Tn and Tencoherency states in accordance with the present invention. As indicatedby like reference numerals, the depicted process is substantiallysimilar to that shown in FIG. 40 and described above.

The process begins at block 4000, for example, with a master 232 of anL2 cache 230 issuing a global bus castout operation on interconnects110, 114 at block 4420 of FIG. 44. The various partial responses thatsnoopers 122, 236 may provide to distributed response logic 210 arerepresented in FIG. 69 by the outcomes of decision blocks 4002′, 4010,4020 and 6902. These partial responses in turn determine the CR for theglobal bus castout operation.

If a snooper 236 affirms the global bus castout operation with a partialresponse indicating that the L2 cache 230 containing the snooper 236holds the requested memory block in any of the M, Me, or Tx states asshown at block 4002′, an error halting processing occurs, as indicatedat block 4004, because the memory block being castout can have only oneHPC (i.e., the requesting L2 cache 230).

As depicted at block 4010, if no M, Me, or Tx snooper 236 affirms theglobal bus castout operation, and further, if no snooper 122 provides apartial response indicating that it is responsible (i.e., the LPC) forthe requested memory block, an error occurs causing processing to halt,as depicted at block 4012. If, however, no M, Me, or Tx snooper 236affirms the bus castout operation and a snooper 122 provides a partialresponse indicating that it is responsible (i.e., the LPC) for therequested memory block but does not affirm the global bus castoutoperation (block 4020), response logic 210 generates a CR indicating“retry”, as depicted at block 4030, because the LPC must be available toreceive the castout memory block.

If a memory controller snooper 122 affirms the bus castout operation(block 4020) and no M, Me, or Tx snooper 236 affirms the global buscastout operation (block 4002′), the requesting L2 cache 230 invalidatesthe memory block within its cache directory 302 and, except for Igcastouts, transmits the memory block to the LPC (block 4024 or block5128). In addition to updating the target memory block, the LPC snooper122 sets the associated domain indicator 3004 to “local” if the castoutmemory block is in the M state (blocks 6900 and 4024) and resets theassociated domain indicator 3004 to “global” if the memory block is inthe Ig state (blocks 6900 and 5128). As further shown at block 6902, ifthe castout memory block is in one of the T, Tn or Te coherency states,the castout is handled in accordance with block 5128 if the partialresponses and CR indicate that an S or Sr′ snooper 236 affirms thecastout operation or is possibly hidden, and is otherwise handled inaccordance with block 4024. In response to an affirmative determinationat block 4020, response logic 210 generates a CR indicating “success”,as illustrated at block 4026.

The update of the domain indicator 3004 to “local” at block 4024 ispossible because a castout of a memory block in the M state, or in thealternative, absence of an affirming or possibly hidden S′ or Sr′snooper 236, guarantees that no remotely cached copy of the memory blockexists.

With reference now to FIG. 70, there is illustrated a high level logicalflowchart of an exemplary method of performing a local bus writeoperation in a data processing system implementing Tn and Ten coherencystates in accordance with preferred embodiments of the presentinvention. As indicated by like reference numerals, the depicted processis substantially similar to that illustrated in FIG. 38 and describedabove.

The process begins at block 3800, for example, with the issuance by anI/O controller 214 of a local bus write operation on a localinterconnect 114 at block 2204 of FIG. 57. The various partial responsesthat snoopers 122, 236 may provide to distributed response logic 210 arerepresented in FIG. 70 by the outcomes of decision blocks 3802, 3810,3812, 3820′, 3822 3830′, and 7000. These partial responses in turndetermine the CR for the local bus write operation.

If no snooper 122 provides a partial response indicating that isresponsible (i.e., the LPC) for the target memory block (block 3802),each affirming snooper 236 invalidates its respective copy of the targetmemory block, as shown at block 3804, and response logic 210 provides a“go global” CR, as illustrated at block 3806, because the LPC is anecessary participant in the bus write operation. As depicted at block3810, if a snooper 122 provides a partial response indicating that it isresponsible (i.e., the LPC) for the requested memory block 3000 but doesnot affirm the local bus write operation (block 3812) and a M or Mesnooper 236 affirms the local bus write operation (block 3810), eachvalid affirming snooper 236 invalidates its respective copy of therequested memory block, if any (block 3824), and response logic 210generates a CR indicating “retry local”, as depicted at block 3818. A“retry local” CR is generated because the LPC must be available toreceive the target memory block. Response logic 210 similarly generatesa “retry” CR at block 3834 if a memory controller snooper 122 indicatesthat it is the LPC for the target memory block, no M, Me, or Tx snooper236 affirms the local bus write operation, and a partial responseindicates that a M, Me, or Tx snooper 236 may be hidden (block 3830′).In this case, each valid affirming snooper 236 invalidates its copy ofthe target memory block, and response logic 210 generates a “retry” CRso that the local bus write operation only succeeds when no HPC copy ofthe requested memory block remains in the system.

Referring again to block 3812, assuming that a M or Me snooper 236affirms the local bus write operation and a snooper 122 affirms thelocal bus write operation as the LPC, the requesting L2 cache 230transmits the requested memory block to the LPC snooper 122 and the M orMe snooper 236 affirming the local bus write operation invalidates itscopy of the requested memory block (block 3814). In addition, the LPCsnooper 122 sets the domain indicator 3004 associated with the targetmemory block to “local”. The process ends at block 3816 with distributedresponse logic 210 generating a CR indicating “success”.

As depicted at block 3820′ and following blocks, if a snooper 122provides a partial response indicating that it is the LPC for the targetmemory block (block 3802) but cannot affirm the local bus writeoperation (block 3822), no M or Me snooper 236 affirms the local buswrite operation (block 3810), and a Tx snooper 236 affirms the local buswrite operation, distributed response logic 210 generates a CRindicating “retry local” (block 3818) to force the operation to bereissued locally, and valid snoopers 236 affirming the local bus writeoperation invalidate their respective copies of the requested memoryblock (block 3824). Assuming the same partial responses except for theLPC snooper 122 affirming the local bus write operation (block 3822),the requesting L2 cache 230 transmits the requested memory block to theLPC snooper 122, and each valid affirming snooper 236 invalidates itsrespective copy of the requested memory block (block 3826). In addition,the LPC snooper 122 sets the domain indicator 3004 associated with thetarget memory block to “local”.

In response to the local bus write operation and partial responses bythe Tx snooper 236 and the LPC snooper 122 affirming the local bus writeoperation, distributed response logic 210 generates a CR indicating“local cleanup” if the Tx snooper 236, prior to invalidation, held thetarget memory block in one of the Tn and Ten states (block 7002), andotherwise generates a CR indicating “cleanup” (block 3828). It shouldnoted that the presence of a Tn or Ten coherency states enables thescope of bus kill operations during cleanup operations to be limited tothe local coherency domain.

Referring now to FIG. 71, there is depicted a high level logicalflowchart of an exemplary method of performing a global bus writeoperation in a data processing system implementing Tn and Ten coherencystates in accordance with the present invention. As indicated by likereference numerals, the process is substantially similar to thatillustrated in FIG. 37 and described above.

As shown, the process begins at block 3700, for example, with an I/Ocontroller 214 issuing a global bus write operation on interconnects110, 114 at block 2220 of FIG. 57. The various partial responses thatsnoopers 122, 236 may provide to distributed response logic 210 arerepresented in FIG. 71 by the outcomes of decision blocks 3710, 3720,3724′, 3726 and 7100. These partial responses in turn determine the CRfor the global bus write operation.

As depicted at block 3710, if no snooper 122 provides a partial responseindicating that it is responsible (i.e., the LPC) for the requestedmemory block, an error occurs causing processing to halt, as depicted atblock 3712. If, however, a snooper 122 provides a partial responseindicating that it is responsible (i.e., the LPC) for the requestedmemory block but does not affirm the global bus write operation (block3720), each valid affirming snooper 236 invalidates its respective copyof the requested memory block, if any (block 3721), and response logic210 generates a CR indicating “retry”, as depicted at block 3722. The“retry” CR is generated because the LPC must be available to receive therequested memory block. Response logic 210 similarly generates a “retry”CR at block 3722 and each valid affirming snooper 236 invalidates itsrespective copy of the requested memory block, if any (block 3721) if amemory controller snooper 122 affirms the global bus write operation buta partial response indicates that an M, Me, or Tx snooper 236 may bepossibly hidden (blocks 3724′). In this case, a “retry” CR is generatedso that the global bus write operation only succeeds when no HPC copy ofthe requested memory block remains in the system.

Referring again to block 3724′, assuming that a snooper 122 affirms theglobal bus write operation as the LPC and no partial responses aregenerated that indicate that a M, Me, or Tx snooper 236 may be possiblyhidden, the requesting L2 cache 230 transmits the requested memory blockto the LPC snooper 122, and valid snoopers 236, if any, affirming thebus write operation invalidate their respective copies of the requestedmemory block (block 3728 or block 3740). As represented by blocks 3726and 3730, if the partial responses indicate that no S′ or Sr′ snooper236 is possibly hidden, the process ends with distributed response logic210 generating a CR indicating “success”. In addition, the LPC snooper122 sets the domain indicator 3004 associated with the requested memoryblock to indicate “local” (block 3728). If, on the other hand, at leastone partial response indicating the presence of a possibly hidden S′ orSr′ snooper 236 was given in response to the global bus write operation(block 3726), distributed response logic 210 generates a CR indicatingthe need for cleanup operations. In particular, distributed responselogic 210 generates a CR indicating “local cleanup” (block 7102) if theTx snooper 236, prior to invalidation, held the target memory block inone of the Tn and Ten states and the LPC snooper 122 and Tx snooper 236are both within the local coherency domain of the requesting I/Ocontroller 214 (block 7100). Otherwise, response logic 210 generates aCR indicating “cleanup” (block 3742).

With reference now to FIG. 72, there is depicted a high level logicalflowchart of an exemplary method of performing a global bus partialwrite operation in a data processing system implementing Tn and Tencoherency states in accordance with the present invention. As indicatedby like reference numerals, the illustrated process is substantiallysimilar to that depicted in FIG. 41 and described above.

The process begins at block 4100, for example, with an I/O controller214 issuing a global bus partial write operation on interconnects 110,114 at block 922 of FIG. 9B. The various partial responses that snoopers122, 236 may provide to distributed response logic 210 are representedin FIG. 72 by the outcomes of decision blocks 4110, 4120, 7200, 7202,4134′ and 4138. These partial responses in turn determine the CR for theglobal bus partial write operation.

As depicted at block 4110, if no snooper 122 provides a partial responseindicating that it is responsible (i.e., the LPC) for the requestedpartial memory block, an error occurs causing processing to halt, asdepicted at block 4112. An error condition arises because the specifiedtarget address has no LPC within data processing system 100.

Distributed response logic 210 generates a CR indicating “retry”, asshown at block 4128, in response to four combinations of partialresponses. First, response logic 210 generates a CR indicating “retry”if a snooper 122 provides a partial response indicating that it isresponsible (i.e., the LPC) for the requested partial memory block butdoes not affirm the global bus partial write operation (block 4120). A“retry” CR is generated because the LPC must be available to receive thepartial memory block from the I/O controller 214. As further shown atblock 4132, each valid affirming snooper 236 (i.e., not an Ig snooper236) invalidates its respective copy of the requested memory block, ifany.

Second, response logic 210 similarly generates a “retry” CR as shown atblock 4128 and each valid affirming snooper 236 invalidates itsrespective copy of the requested memory block, if any (block 4132) if amemory controller snooper 122 affirms the global bus partial writeoperation, no M, Me, or Tx snooper 236 affirms the global bus partialwrite operation (blocks 7200 and 7202), but a partial response indicatesthat a M, Me, or Tx snooper 236 may be possibly hidden (block 4134′). A“retry” CR is generated to avoid stale copies of the target memory blockremaining in data processing system 100 following an update to systemmemory 108.

In the third and fourth cases, response logic 210 generates a “retry”CR, as illustrated at block 4128, if a memory controller snooper 122affirms the global bus partial write operation, and an M, Me, or Txsnooper 236 affirms the global bus partial write operation (block 7200or block 7202). In either of the third and fourth cases, each validaffirming snooper 236 invalidates its copy of the target memory block,as shown at blocks 4124, 4126 and 4132 (an affirming M, T, Te or Tensnooper 236 invalidates its copy of the target memory block during thecache castout operation at block 4124). In addition, as just noted, anM, T, Te or Tn snooper 236 initiates a cache castout operation of thecache line containing the partial memory block, as depicted at block4124. Thus, a “retry” CR is generated, as depicted at block 4128, sothat the global bus partial write operation only succeeds when no staleHPC copy of the requested partial memory block will remain in dataprocessing system 100.

Referring again to block 4134′, assuming that a snooper 122 affirms theglobal bus partial write operation as the LPC, no M, Me, or Tx snooper236 affirms the global bus partial write operation or is possiblyhidden, the requesting L2 cache 230 transmits the partial memory blockto the LPC snooper 122, and valid snoopers 236, if any, affirming theglobal bus partial write operation invalidate their respective copies ofthe requested memory block (block 4136). In addition, the LPC snooper122 updates the domain indicator 3004 for the updated memory block to“global”. As shown at blocks 4138 and 4140, if the partial responsesindicate that no hidden S′ or Sr′ snooper 236 exists, the process endswith distributed response logic 210 generating a CR indicating“success”. If, on the other hand, at least one partial responseindicating the presence of a possibly hidden S′ or Sr′ snooper 236 wasgiven in response to the global bus partial write operation, distributedresponse logic 210 generates a CR indicating “cleanup” (block 4142),meaning that the requesting L2 cache 230 must issue one or more bus killoperations to invalidate the requested memory block in any such hiddenS′ or Sr′ snooper 236.

While the invention has been particularly shown as described withreference to a preferred embodiment, it will be understood by thoseskilled in the art that various changes in form and detail may be madetherein without departing from the spirit and scope of the invention.

1. A method of data processing in a cache coherent data processingsystem including at least first and second coherency domains, saidmethod comprising: storing a memory block in a system memory; storing,in association with the memory block, a domain indicator indicatingwhether or not said memory block is cached, if at all, only within saidfirst coherency domain.
 2. The method of claim 1, and furthercomprising: storing said memory block and domain indicator in a cachewithin said first coherency domain; a master in said first coherencydomain determining whether or not a scope of broadcast transmission ofan operation should extend beyond said first coherency domain byreferenced to said domain indicator stored in said cache; and saidmaster performing a broadcast of the operation within the cache coherentdata processing system in accordance with said determination.
 3. Themethod of claim 1, wherein: said domain indicator has at least first andsecond settings; said method further comprises: transmitting the memoryblock and domain indicator from said system memory to a master inresponse to an operation; the master receiving a combined response tothe operation; and the master interpreting the combined response assuccessful if said domain indicator has said first setting andinterpreting said combined response as unsuccessful if said domainindicator has said second setting.
 4. The method of claim 3, and furthercomprising: the master discarding the memory block in response to saiddomain indicator has said second setting.
 5. The method of claim 1, andfurther comprising: updating said domain indicator to indicate that acopy of said memory block may be cached outside of said first coherencydomain in response to a copy of said memory block being supplied to amaster outside of said first coherency domain.
 6. The method of claim 1,and further comprising: updating said domain indicator to indicate thata copy of said memory block may be cached outside of said firstcoherency domain in response to receiving a copy of said memory blockand an indication that a copy of said memory block may be cached outsideof said first coherency domain.
 7. The method of claim 1, and furthercomprising: updating said domain indicator to indicate that a copy ofsaid memory block is cached, if at all, only within said first coherencydomain in response to said system memory providing a copy of said memoryblock to a master within said first coherency domain.
 8. A cachecoherent data processing system, comprising: a plurality of processingunits each having at least an associated cache, wherein said pluralityof processing units are organized within at least first and secondcoherency domains; a system memory; a memory controller within saidfirst coherency domain that is coupled to and controls access to saidsystem memory; wherein said system memory stores a memory block and, inassociation with the memory block, a domain indicator indicating whetheror not said memory block is cached, if at all, only within said firstcoherency domain.
 9. The cache coherent data processing system of claim8, wherein: said first coherency domain includes a cache storing saidmemory block and domain indicator; said first coherency domain includesa master that determines whether or not a scope of broadcasttransmission of an operation should extend beyond said first coherencydomain by referenced to said domain indicator stored in said cache andthen performs a broadcast of the operation within the cache coherentdata processing system in accordance with said determination.
 10. Thecache coherent data processing system of claim 8, wherein: said domainindicator has at least first and second settings; said first coherencydomain includes a master; said memory controller transmits the memoryblock and domain indicator from said system memory to said master inresponse to an operation; and said master, responsive to receiving acombined response to the operation, interprets the combined response assuccessful if said domain indicator has said first setting andinterprets said combined response as unsuccessful if said domainindicator has said second setting.
 11. The cache coherent dataprocessing system of claim 10, and further comprising: the masterdiscarding data received in response to said operation if said domainindicator has said second setting.
 12. The cache coherent dataprocessing system of claim 8, wherein said memory controller updatessaid domain indicator to indicate that a copy of said memory block maybe cached outside of said first coherency domain in response to a copyof said memory block being supplied to a master outside of said firstcoherency domain.
 13. The cache coherent data processing system of claim8, wherein said memory controller updates said domain indicator toindicate that a copy of said memory block may be cached outside of saidfirst coherency domain in response to receiving a copy of said memoryblock and an indication that a copy of said memory block may be cachedoutside of said first coherency domain.
 14. The cache coherent dataprocessing system of claim 8, wherein said memory controller updatessaid domain indicator to indicate that a copy of said memory block iscached, if at all, only within said first coherency domain in responseto providing a copy of said memory block to a master within said firstcoherency domain.
 15. A memory system for a cache coherent dataprocessing system including at least first and second coherency domains,said memory system comprising: a system memory; and a memory controllerbelonging to said first coherency domain, wherein said memory controlleris coupled to and controls access to said system memory; wherein saidsystem memory stores a memory block and, in association with the memoryblock, a domain indicator indicating whether or not said memory block iscached, if at all, only within said first coherency domain.
 16. Thememory system of claim 15, and further comprising: a cache in said firstcoherency domain that stores said memory block and domain indicator,wherein a master in said first coherency domain determines whether ornot a scope of broadcast transmission of an operation should extendbeyond said first coherency domain by referenced to said domainindicator stored in said cache.
 17. The memory system of claim 15,wherein: said domain indicator has at least first and second settings;said memory controller transmits the memory block and domain indicatorfrom said system memory to said master in response to an operation; andsaid master, responsive to receiving a combined response to theoperation, interprets the combined response as successful if said domainindicator has said first setting and interprets said combined responseas unsuccessful if said domain indicator has said second setting. 18.The memory system of claim 15, wherein said memory controller updatessaid domain indicator to indicate that a copy of said memory block maybe cached outside of said first coherency domain in response to a copyof said memory block being supplied to a master outside of said firstcoherency domain.
 19. The memory system of claim 15, wherein said memorycontroller updates said domain indicator to indicate that a copy of saidmemory block may be cached outside of said first coherency domain inresponse to receiving a copy of said memory block and an indication thata copy of said memory block may be cached outside of said firstcoherency domain.
 20. The memory system of claim 15, wherein said memorycontroller updates said domain indicator to indicate that a copy of saidmemory block is cached, if at all, only within said first coherencydomain in response to providing a copy of said memory block to a masterwithin said first coherency domain.